Created
September 26, 2025 19:57
-
-
Save mike-weiner/2277da033deef9652cb6a44f4e567e65 to your computer and use it in GitHub Desktop.
Instructions for creating a Kubernetes Docker Configuration secret to pull container images from a private registry.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Optional: Delete Existing Registry Credential | |
| kubectl delete secrets -n <NAMESPACE> <SECRET-NAME> | |
| # Create Docker Config Secret | |
| kubectl create secret generic -n <NAMESPACE> <SECRET-NAME> \ | |
| --type=kubernetes.io/dockerconfigjson \ | |
| --from-file=.dockerconfigjson=/path/to/config.json | |
| # /path/to/config.json should be in the format shown below. | |
| # [REDACTED] should be your base64 encoded credentials. | |
| # Docker stores this file at: ~/.docker/config.json | |
| # Podman stores this file at: .config/containers/auth.json | |
| # | |
| # | |
| # { | |
| # "auths": { | |
| # "myprivate-registry.io": { | |
| # "auth": "[REDACTED]" | |
| # } | |
| # } | |
| # } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment