Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
To complement this article, here is a free, hands-on scenario for a comparable way of deploying and using a private registry on Kubernetes.
Hi, did the full tutorial, I have working the echo example and others, but when I try to push the ssl cetificate say “certificate is valid for ingress.local”. I can’t undertand why i’m having this problem, did try to see if the certificate is create and it ok.
Please need some help here im new to this.
regards.
PS: Thanks for all your work and tutorials.
Hi,
how can I do the same example but with 2 site with diferent annotations?
I’m trying to do it but have the error “certificate is valid for ingress.local”
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: docker-registry
annotations:
kubernetes.io/ingress.class: nginx
certmanager.k8s.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/proxy-body-size: "30720m"
spec:
tls:
- secretName: letsencrypt-prod
hosts:
- registry.example.com
rules:
- host: registry.example.com
http:
paths:
- backend:
serviceName: docker-registry
servicePort: 5000
and the other is
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: docker-registry-2
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/connection-proxy-header: "keep-alive"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/configuration-snippet: |
proxy_set_header "Upgrade $http_upgrade";
proxy_set_header "Host $host";
proxy_cache_bypass "$http_upgrade";
proxy_set_header "X-Forwarded-For $proxy_add_x_forwarded_for";
proxy_set_header "X-Forwarded-Proto $scheme";
spec:
tls:
- secretName: letsencrypt-prod
hosts:
- registry2.example.com
rules:
- host: registry2.example.com
http:
paths:
- backend:
serviceName: docker-registry-2
servicePort: 5000
for mac users, I had issues with the htpasswd part. The credentials I put in were not working. I went to the docker-registry helm chart README and found this command:
docker run --entrypoint htpasswd registry:2 -Bbn user password > ./htpasswd_file
Ran that instead of the author’s docker command and my credentials worked. Everything else worked fine as described in the post. Try that command if you run into a similar issue :)
Great article sadly I’m probably missing something. While my registry is running on NodeA any pod that is running on NodeB cannot pull the images for some reasons I cannot explain:
Normal Scheduled 2m7s default-scheduler Successfully assigned dev/<REDACTED> to preprod-1-me4a
Normal SandboxChanged 108s kubelet, preprod-1-me4a Pod sandbox changed, it will be killed and re-created.
Normal Pulling 53s (x3 over 2m4s) kubelet, preprod-1-me4a pulling image "<REDACTED>"
Warning Failed 38s (x3 over 109s) kubelet, preprod-1-me4a Failed to pull image "<REDACTED>": rpc error: code = Unknown desc = Error response from daemon: Get https://<REDACTED>/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Warning Failed 38s (x3 over 109s) kubelet, preprod-1-me4a Error: ErrImagePull
Normal BackOff 11s (x6 over 107s) kubelet, preprod-1-me4a Back-off pulling image "<REDACTED>"
Warning Failed 11s (x6 over 107s) kubelet, preprod-1-me4a Error: ImagePullBackOff
Could you please hint me ? Thanks
Wow, the ingress tutorial works great, but this tutorial isn’t working at all. After installing the docker registry, the pod for the registry startes up, does 20 seconds of healthy checks and then goes into 503 errors. Eventually K8s kills it and the cycle repeats.
The s3 credentials are definitely right. (It did create some files on it when I tried to push images, but then quickly failed)
Any idea what could be the problem?
Thanks @Kathryn for creating this wonderful article. If I may, I suggest you change edit the article to use
For creating the docker credentials, doing this allowed me to complete this task using macos since the docker credentials are stored in the apple keychain rather than in the docker file.
Great article, it works well for the most part. However, the latest version of the docker-registry helm chart has issues with using Spaces (and maybe other S3 derivatives) as the backing storage. Here is the relevant Github issue with the fix being to use modify the chart to use an older registry image (use 2.5.2 instead of 2.7.1)
This comment has the command I used to update the helm deployment to use the older image.
I was tipped off because the pod had around 1000 restarts, and the _catalog URL was not working. Other things like push and pulls worked but had sporadic failures. Hope this helps other people who come to this tutorial more recently.
It would be nice to add a note about this to the tutorial, but I understand it’s tough to maintain articles as tech changes so quickly.
Hey @Khankox, thanks for the detailed instruction, I’m really appreciated!
I had a small issue (I was so close to the result): at step 4 (Testing Kubernetes Integration by Running a Sample Deployment), I can’t get the sample container to work, when I do kubectl get pods, all of hello-kubernetes pods are marked as ImagePullBackOff.
When I describe the pods, it said ....no basic auth credentials. I think I’ve done something wrong with the regcred, so my K8S can’t pull the image from my registry. But I tried to start over again without any success.
I’ve tried the comment of @lrosa007 and @C00 but it didn’t work either.
Hmm… this is sooooo close… please any ideas to resolve this would be tons of appreciated!
Thanks for the tutorial!
A little update on chart_values.yaml, I had to change the annotation
from:
certmanager.k8s.io/cluster-issuer: letsencrypt-prod
to:
cert-manager.io/cluster-issuer: letsencrypt-prod
cert-manager logs really helped me to troubleshoot the issue of K8s generating a local certificate instead of getting one from lets-encrypt
Follow reference the log entry
I1222 00:33:47.173445 1 sync.go:50] cert-manager/controller/ingress-shim "level"=0 "msg"="not syncing ingress resource as it does not contain a \"cert-manager.io/issuer\" or \"cert-manager.io/cluster-issuer\" annotation" "resource_kind"="Ingress" "resource_name"="docker-registry" "resource_namespace"="default"