How to diagnose a "Error syncing pod" pod on Kuberentes?

6/7/2018

I've got a deployment that has a pod that is stuck at :

The describe output has some sensitive details in it, but the events has this at the end:

  ...
  Normal   Pulled                 18m (x3 over 21m)  kubelet, ip-10-151-21-127.ec2.internal  Successfully pulled image "example/asdf"
  Warning  FailedSync             7m (x53 over 19m)  kubelet, ip-10-151-21-127.ec2.internal  Error syncing pod

What is the cause of this error? How can I diagnose this further?


It seems to be repulling the image, however it's odd that it's x10 over 27m I wonder if it's maybe reaching a timeout?

  Warning  FailedSync             12m (x53 over 23m)  kubelet, ip-10-151-21-127.ec2.internal  Error syncing pod
  Normal   Pulling                2m (x10 over 27m)   kubelet, ip-10-151-21-127.ec2.internal  pulling image "aoeuoeauhtona.epgso"
-- Chris Stryczynski
kubernetes

2 Answers

6/8/2018

The kubelet process is responsible for pulling images from a registry.

This is how you can check the kubelet logs:

$ journalctl -u kubelet

More information about images can be found in documentation.

-- VAS
Source: StackOverflow

6/7/2018

You can check the logs of your pod:

kubectl logs pod-id

More information here: https://kubernetes.io/docs/tasks/debug-application-cluster/debug-pod-replication-controller/

-- Stanko
Source: StackOverflow