I am trying to setup a private docker registry to work with Kubernetes. I've setup the registry and the master-server thats running the Kubernetes cluster can pull images from the registry without a problem. Also, I've followed the docs of Kubernetes that explain how to connect to a private docker registry (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/).
However, when I try to pull images from the docker registry through Kubernetes I get the following error:
Failed to pull image "xxx.xxx.xxx.xxx:5000/helloworld:latest": rpc error: code = Unknown desc = Error response from daemon: Get https://xxx.xxx.xxx.xxx:5000/v1/_ping: x509: certificate signed by unknown authority
What I noticed is that the link that ends with v1/_ping is incorrect, it should be v2/_ping.
I ran the following command to generate my regcred:
kubectl create secret docker-registry regcred --docker-server="https://xxx.xxx.xxx.xxx:5000/v2/" --docker-username=xxxxx --docker-password=xxxxxx [email protected]
I also googled a bit and found this: https://github.com/kubernetes/kubernetes/issues/20786
These suggestions, unfortunately, it didn't help, but they do indicate that more people face the same issue.
Does someone know how to correctly setup a docker registry v2 with Kubernetes?
Thanks