hardkubectl
Retrieve logs from a specific container within a multi-container pod
command
kubectl logs POD_NAME -c CONTAINER_NAMEalso accepted
kubectl logs POD_NAME -ckubectl logs POD_NAME --container CONTAINER_NAMEcommand
kubectl logs POD_NAME -c CONTAINER_NAMEalso accepted
kubectl logs POD_NAME -ckubectl logs POD_NAME --container CONTAINER_NAMEPart of the Kubernetes CLI (kubectl) — Debugging category.
| Flag | Purpose |
|---|---|
-c | Boolean flag |
Test your recall — not just your reading.
Practice with interactive quiz →