Answer the question
In order to leave comments, you need to log in
How to properly configure Docker and Kubernetes to use local images on Linux?
It doesn’t work to use local images on Linux when trying to create a Pod, it constantly gives an ErrImagePull or ImagePullBackoff error, and in the description it says that the image does not exist or you need to log in to use it, that is, there are constantly attempts to pull the image from the docker hub, and not from local storage . I tried to use minicube with both docker driver and virtualbox - the result is the same. When used with virtualbox, I also used the "eval $(minikube docker-env)" command - the same result. Tried to set ImagePullPolicy: IfNotPresent in yaml config - didn't help. In general, it only works if you actually upload the image to the docker hub, then when you create a Pod, it is downloaded and the Pod is created and works without errors (it doesn’t matter with a docker driver or virtualbox - it works).
Answer the question
In order to leave comments, you need to log in
The solution in the end can be considered adding the image to the minikube cache with the "minikube cache add image_name" command. It is also advised to add imagePullPolicy: Never in the config, but it works without it, there is a "Container image already present on machine" in the description of the pod, so minikube does not even try to connect to the docker hub.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question