codegurukool.com · Free coding tutorials & online compiler

Home › Kubernetes Tutorial › Inspect Pods: get, describe, logs

Inspect Pods: get, describe, logs

See what is happening.

kubectl get lists objects, kubectl describe shows details and recent events, and kubectl logs prints a container's output. Add -o wide for more columns or -o yaml for the full object. Use kubectl exec -it POD -- sh to open a shell inside a container.

Example code

kubectl get pods
kubectl logs hello-pod

Run this code in the online editor

← Pods and YAML manifestsDeployments →