In kubernetes, if you have a container running in a pod, that exposes a web server through some port, since the pod only has an internal IP within the cluster and say you have no public IP for the pod using kubernetes "service" approach, how can you access the webserver? (answer contains two steps)
Through using "kubectl proxy", and then doing curl to the API endpoint of the pod
^^ note that "kubectl proxy" command creates a proxy process through which you can hit the endpoints of your cluster
^^^ note that "kubectl proxy" does not return any output and just keeps running in the shell till you ctrl-c/termintate it, so run it from a seperate terminal than your curl command
^^^^ the curl command would be something like: curl http://localhost:8001/api/v1/namespaces/default/pods/$POD_NAME/proxy/
, where 8001 is port proxy is running on
In kubernetes, if you have a container running in a pod, that exposes a web server through some port, since the pod only has an internal IP within the cluster and say you have no public IP for the pod using kubernetes "service" approach, how can you access the webserver? (answer contains two steps)
In kubernetes, if you have a container running in a pod, that exposes a web server through some port, since the pod only has an internal IP within the cluster and say you have no public IP for the pod using kubernetes "service" approach, how can you access the webserver? (answer contains two steps)
Through using "kubectl proxy", and then doing curl to the API endpoint of the pod
^^ note that "kubectl proxy" command creates a proxy process through which you can hit the endpoints of your cluster
^^^ note that "kubectl proxy" does not return any output and just keeps running in the shell till you ctrl-c/termintate it, so run it from a seperate terminal than your curl command
^^^^ the curl command would be something like: curl http://localhost:8001/api/v1/namespaces/default/pods/$POD_NAME/proxy/
, where 8001 is port proxy is running on
status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|
repetition number in this series | 0 | memorised on | scheduled repetition | ||||
scheduled repetition interval | last repetition or drill |