1

I have been doing some exercises with PODs in the OpenShift Developer Sandbox. During my last exercise I attempted to create a Multi-Container POD with python and redis :

Multi-Container POD

I was using these templates from Janakiramm: https://github.com/janakiramm/Kubernetes-multi-container-pod/tree/master/Deploy

Unfortunately there are two errors:

  • a CrashLoopBackOff in the POD with the mysql container
  • an imagePullBackOff in the POD with the python and redis containers

When I hove over these status I get a brief, but not a detailed description. In case someone has a hint on the exact meaning of these two states, I would be very grateful.

Status Error

1 Answer 1

3

an imagePullBackOff in the POD with the python and redis containers

ImagePullBackOff means that Kubernetes was unable to pull the image defined in your Pod spec. You can get more details about this error by running kubectl describe pod <podname> and looking at the Events: field, or by running kubectl get events and looking for events associated with your pod.

Common causes for this error include:

  • An invalid image name
  • Hitting Docker Hub rate limits
  • Failure to authenticate to a remote registry

For example, if I intentionally create a Pod with an invalid image name, I see it go into ImagePullBackOff state:

$ kubectl get pod
NAME                           READY   STATUS             RESTARTS   AGE
demo-server                    0/1     ImagePullBackOff   0          96s

And running kubectl describe pod demo-server shows:

.
.
.
Events:
  Type     Reason          Age                From               Message
  ----     ------          ----               ----               -------
  Normal   Scheduled       49s                default-scheduler  Successfully assigned lars-sandbox/demo-server to wrk-89
  Normal   AddedInterface  48s                multus             Add eth0 [10.131.10.85/23] from openshift-sdn
  Normal   BackOff         22s (x2 over 47s)  kubelet            Back-off pulling image "docker.io/alpinelinux/darkhttpdz"
  Warning  Failed          22s (x2 over 47s)  kubelet            Error: ImagePullBackOff
  Normal   Pulling         7s (x3 over 48s)   kubelet            Pulling image "docker.io/alpinelinux/darkhttpdz"
  Warning  Failed          7s (x3 over 48s)   kubelet            Failed to pull image "docker.io/alpinelinux/darkhttpdz": rpc error: code = Unknown desc = reading manifest latest in docker.io/alpinelinux/darkhttpdz: requested access to the resource is denied
  Warning  Failed          7s (x3 over 48s)   kubelet            Error: ErrImagePull

a CrashLoopBackOff in the POD with the mysql container

CrashLoopBackOff means that Kubernetes was able to successfully pull the image and start your container, but then the container process exited with an error.

You can generally get more information about this problem by looking at the output of kubectl logs <pod>. If your pod has multiple containers, you can specify --all-containers=true or you can specify a particular container with -c <container>. In some cases (e.g. if your Pod spec attempts to run a command that doesn't exist), you will also find useful information in kubectl describe/kubectl get events as described in the previous section.

Typical reasons for CrashLoopBackOff include:

  • Passing an invalid configuration to your application
  • Specifying an invalid command in your Pod spec
1
  • This happens a lot in the sandbox when I attempt to deploy a kafka POD from the registry registry.connect.redhat.com/turbonomic/kafka . I end up with this very same CrashLoopBackOff error "back-off 5m0s restarting failed container=web pod=kafka_userid-codeklaudia-dev(c1239406-145e-4671-a1a6-9ceeea5dfe7b) CrashLoopBackOff ". Unfortunately I cannot access neither the logs nor the events at the sandbox. Commented Sep 30, 2023 at 3:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.