Question
Gitlab Registry Forbidden with managed Kubernetes Cluster
Hello,
I’m currently trying out the managed Kubernetes Cluster with the Gitlab CI/CD and integrated private Registry. To understand my problem you need to know that I currently have a working Docker Swarm Cluster with that CI/CD and private Registry in use.
However with the managed Kubernetes the Pod Creation is always stuck at “ImagePullBackOff” with following error:
Failed to pull image "registry.gitlab.com/<PROJECT-PATH>/<BRANCH>:<COMMIT HASH>": rpc error: code = Unknown desc = Error response from daemon: Get "registry.gitlab.com/<PROJECT-PATH>/<BRANCH>:<COMMIT HASH>": denied: access forbidden
I tried it with Helm/Tiller and also with a normal Kubernetes Deploy file. The secret is in the same namespace as the deployment and is working on the mentioned Docker Swarm and on my local machine.
Is DO doing something weird here? Maybe someone of you have more information.
Kind regards,
Kai
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
Do you have this registry configured with authentication? If so i would try creating a secret with valid credentials to be used by the deployment trying to make the pull:
https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/