Facing imagepullbackoff error inside k8s 3 node cluster on local company server

Viewed 217

I have created a 3-node Kubernetes cluster, but my Jenkins-based CI/CD process is stuck in an ImagePullBackOff state. I have built the image on a worker node but master can not fetch the image, and I get an error of ImagePullBackOff. For some micro-services it works fine by pulling the image from worker node, and for some not.

kubectl describe pod shows:

Events:


 Type     Reason     Age                From               Message
  ----     ------     ----               ----               -------
  Normal   Scheduled  38s                default-scheduler  Successfully assigned dis-serv-ns/dis-serv-deploy-7c54ddb67c-tbbqg to kubernetes-worker2
  Normal   Pulling    20s (x2 over 36s)  kubelet            Pulling image "disc-server:latest"
  Warning  Failed     17s (x2 over 34s)  kubelet            Failed to pull image "disc-server:latest": rpc error: code = Unknown desc = Error response from daemon: pull access denied for disc-server, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
  Warning  Failed     17s (x2 over 34s)  kubelet            Error: ErrImagePull
  Normal   BackOff    2s (x2 over 33s)   kubelet            Back-off pulling image "disc-server:latest"
  Warning  Failed     2s (x2 over 33s)   kubelet            Error: ImagePullBackOff
1 Answers

The following are the reason due to which imagepullbackoff error face. 1: ECR Token expire after 12 hours that's a reason imagePullbackoff error occurs. So we need to update the token in case off when we are pulling the images from ECR inside k8s cluster. 2: When the image is not available inside the repository.

Related