K8s debug pod errors

See pod details (filtered)

see most important pod details

kubectl describe pod {name_of_your_pod_here}

(at the end where the events are, we see the image it is trying to use doesn’t exist).

kubernetes debug pod 1

get YAML

kubectl get pod {pod_name_goes_here} -o yaml

kubernetes debug pod 2

Debug logs for a Pod

Get logs

kubectl logs {your_pod_name_goes_here} -f
  • -f is optional. this is for real-time logs.

kubernetes debug pod 3

Connect to a Container inside a Pod

Sólo para debug. No se deberia usar de normal ya que los contenedores se matan y crean constantemente.

connect through SSH to a Pod with 1 Container:

kubectl exec -it {your_pod_name_goes_here} -- sh