Debugging

Pod Monitoring and Logging

Describe deployments or pods for obtaining the subsequent events.

$ kubectl describe po/<pod-name>

Replace <pod-name> with the name of your pod.

Get the pod logs using the below command.

$ kubectl logs <pod-name>

Exec into the pod

$ kubectl exec -it <pod-name> /bin/bash
$ ps -ef

See all processes inside the pod using this command.

$ exit

Type exit command to come out of the pod.

Thanks for reading. Hope you're having a good day!

Last updated