kubernetes: private Registry does not work with Deployment Ressource
Please reopen ticket #57801 - I believe the problem reoccured in v1.12 @area/kubelet-api
What happened:
kind Deployment does not care about private registry.
What you expected to happen:
Following the official guide to setup a private docker registry works with deployments, too.
How to reproduce it (as minimally and precisely as possible):
Follow https://kubernetes.io/docs/concepts/containers/images/#using-a-private-registry to configure a private registry. publish an image to your private registry and try to use is within a yaml kind: Deployment. Result: Image can’t be pulled.
Anything else we need to know?:
Environment:
-
Kubernetes version (use
kubectl version
): client v1.12 (git 1.12.0) server v1.12 (git 1.12.2) -
Cloud provider or hardware configuration: onPremise
-
OS (e.g. from /etc/os-release): centos7
-
Install tools: kubeadm
/kind bug
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (5 by maintainers)
It turns out that there are barely any search results out there that talks about ways to resolve this issue. In my case the issue with the url. The official tutorial mention in my posts above completely missed that also. The solution was to make sure that the url has the v2 part attached to it. In other words, it should be like this
registry.mydomain.com/v2
that is if your registry is version 2. I believe the document just saysregistry.mydomain.com
.I did it that way (zap is my namespace and regcert is the secret):
kubectl -n zap patch serviceaccount default -p ‘{“imagePullSecrets”: [{“name”: “regcred”}]}’