How do I connect to a container?
To connect to a pod within a container, use the kubectl exec
command line, replacing <namespace>
, <pod_name>
, <container_name>
, and <command>
with your values:
kubectl -n <namespace> exec {-it} <pod_name> -c <container_name> <command>
For example, the following command line allows you to connect to the
|