I want to deploy a Helmchart that takes a Docker image as an input parameter. This image lives in a private GitLab registry.
When I deploy this on a local Kubernetes cluster it does work, though I have the idea that I have to pull the image using docker pull registry.gitlab.com/<group_name>/<repo_name>/<image_name>
because it otherwise raises an error that it can't reach it.
To be honest, I'm also not sure why this is.
Now I have a Kubernetes cluster deployed on Azure and my kubectl
is correctly pointing to that cluster.
It works when I deploy the Helmchart using a public Docker image, but when I pass an image in a private repo it times out.
Could someone maybe point me in the direction of why it somehow can't reach the private repo while working with my local cluster?
And could someone explain how to let the Kubernetes cluster on Azure reach the private repo?
CodePudding user response:
I went through the Kubernetes documentation on using a private registry and got it to work.
First create a secret, then configure your serviceaccount so it has access to that secret.
It now seems to work locally and on Azure.