FahamLah

Commands

kubectl exec

kubectl exec <pod> [-c container] -- <command> [args]

Risk: Careful

What it does

Runs one command inside a running container.

When to use it

To test from inside the cluster, for example a Service name.

Example

$ kubectl exec client -- wget -qO- http://shop

From the client pod, ask the shop for its page.