OnCallReady

Commands

kubectl proxy - Run a proxy to the Kubernetes API server

kubectl proxy [--port=PORT] [--address=ADDR]

Options you will use

-p, --port=8001
The port on which to run the proxy. Set to 0 to pick a random port.
--address=127.0.0.1
The IP address on which to serve on.

Examples

$ kubectl proxy &

Starting to serve on 127.0.0.1:8001

$ curl localhost:8001/api/v1/namespaces/shop/pods

the raw API, authenticated with your kubeconfig

$ curl localhost:8001/api/v1/namespaces/shop/services/web:80/proxy/

the apiserver's service proxy: reach a ClusterIP service from outside

Gotchas

Try kubectl proxy in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.