Kubernetes showing Image Pull Error while scheduling pods

3/5/2019

I have configured a secret on Kubernetes and inside the node, I am able to pull an image with docker pull perfectly. But when kubectl tries to schedule a pod on the node it shows image pull backoff error. Is there any setting needs to be done while bootstrapping. I am using community AMI on AWS for Kubernetes node.

-- Rahul Agarwal
docker
kubernetes

1 Answer

3/6/2019

Try this:

  1. kubectl describe pod-name - see event log at the end. it should show series of events starting from initial image pull to subsequent attempts and may continue to restart in order to achieve desired state as per deployment record
  2. In most scenarios something within container erroring out resulting restart expected behavior by k8s. to check logs - kubectl logs pod-name
  3. Try to keep container running so you can peek inside running container for more troubleshooting using kubectl exec -it pod-name (if single container) or kubectl exec -it pod-name -c container-name.
-- AnilR
Source: StackOverflow