22 Ekim 2022 Cumartesi

minikube docker-env seçeneği - Minikube Yerel Docker Registry'i Kullanır

Giriş
minikube image'ı Docker Hub'dan çekmeye çalışır, ancak bu durumda kendi bilgisayarımızdaki docker image'lerine erişemez. 

Örnek
Yerel docker registry'den image çekmesi için şöyle yaparız
eval $(minikube docker-env)
Örnek
Açıklaması şöyle
Because in this example we will create a pod from a locally built image the Minikube will throw an error on the pod creation because the locally built image won't be on the Docker Hub. Of course, you could upload the image to a Docker Hub, but for this example, I won't do it, to keep it simple. So just run the command :

$eval $(minikube docker-env)
Then we have to build the image again for the Minikube environment by executing the command:

$docker image build -t multithreading-docker .

Now we can run the pod with the following command:

$kubectl run multithreading-docker-pod\
          --image=multithreading-docker:latest\
          --image-pull-policy=Never\
          pod/multithreading-docker-pod


Hiç yorum yok:

Yorum Gönder

Cluster Propotional Autoscaler - ReplicaSet Ekler/Siler

Giriş Açıklaması şöyle CPA aims to horizontally scale the number of Pod replicas based on the cluster’s scale. A common example is DNS ser...