← Debugging121 / 640
hardkubectl

Attach to the primary process running inside a pod container for live interaction

command

kubectl attach POD_NAME -c CONTAINER_NAME -it

also accepted

kubectl attachkubectl attach POD_NAMEkubectl attach POD_NAME -it

Command breakdown

Part of the Kubernetes CLI (kubectl) — Debugging category.

kubectlattachPOD_NAME-cCONTAINER_NAME-it
FlagPurpose
-cBoolean flag

Test your recall — not just your reading.

Practice with interactive quiz →