I was trying to add a dockerconfigjson secret to pull images from my private github repo docker.pkg.github.com. I was following the docs on https://docs.digitalocean.com/products/container-registry/how-to/use-registry-docker-kubernetes/. I created the secret and updated my deployment to read from it on the imagePullSecrets block. Everything seems to work fine on my DOKS 1.19. I can successfully pull my private images. However, on 1.20 and 1.21, the same manifests/configuration throws me a “401 Unauthorized” error. I tried to delete and recreate both of them. I checked the namespace, used the same version of kubectl as the cluster, but couldn’t make it work. Does someone facing the same problem with DOKS 1.20 and 1.21?
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!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!