Custom image keeps giving ErrImageBackOff

I have a very simple dockerfile:


CMD /bin/bash

After building image based on that file with docker build I’m doing kubectl create deployment. After checking with kubectl describe pods I’m getting ErrImageBackOff.
I’ve even pushed that image to my docker repo because I read somewhere that kubectl always pulls from registry. That didn’t help.
How to make that container running?

Thank you

It is not really a Docker question, but I guess you are using Kubernetes in Docker Desktop.

If you get that error message it could mean the image is private and you need to create a credential in Kubernetes.

Not entirely true. You can change the image pull policy:

so you can have the image locally.

Thank you, that indeed helped.