The question π€
How do you get Docker images π³ in your Kubernetes cluster from private Docker registries like AWS ECR, Nexus, etc?
Context
For images like Mongodb, Elastic, that are hosted on Docker Hub, itβs straightforward because they are hosted in a public repository and anyone can access them.
But your own application lives in a private repository and needs explicit access from the cluster. So how do you pull the application images from your private docker repository on Kubernetes cluster?
How to do it ππΌ
There are 2 steps to take to achieve it.
1) you create a Secret component that contains access token/credentials to your Docker registry.
2) you configure your Deployment component to use that secret using a specific imagePullSecrets attribute.
Note: Pods can only reference imagePullSecrets in their own namespace, so this process needs to be done one time per namespace!
In the demo video π¬ I show you the whole process step by step:
Hope it's helpful some of you π
I'm excited to host my first *LIVE Webinar on Kubernetes * π€ π©π»βπ»
Date: The webinar is on Saturday June 13, 2020
Topic: Deploy Elasticsearch StatefulSet and Kibana with Helm on a Cloud platform
Top comments (1)
Hi Nana, thank you so much for the excellent content.
You added "imagePullPolicy: Always" to force docker download the image because you had it in your host already.
I think it wouldn't matter since the Docker pulling the image is the one inside minikube, not the one running in your host.
Am I understanding this correctly?
Thanks!