N
N
Nikita Beletsky2020-12-15 17:24:04
Docker
Nikita Beletsky, 2020-12-15 17:24:04

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

4 answer(s)
N
Nikita Beletsky, 2020-12-15
@HoneyBadger397

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.

L
liamin, 2017-01-13
@liamin

php.net/manual/en/language.namespaces.basics.php

M
Maxim Grechushnikov, 2017-01-13
@maxyc_webber

echo __DIR__;
echo getcwd();

N
newpy, 2017-01-13
@newpy

Make it beautiful right away, write|learn normal autoload, or generate it using composer:
https://habrahabr.ru/post/149678/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question