Appearance
Pulling from private registry
Using existing credentials from Docker config file
- Delete an existing secret if you have one;
kubectl delete secret regcred - Create a new secret named
regcredwith contents fromconfig.jsonfile;
sh
kubectl create secret generic regcred --from-file=.dockerconfigjson=/home/nwero/.docker/config.json --type=kubernetes.io/dockerconfigjson- Verify that the secret has been created successfully and Kubelet should be able to pull images from private registry
Creating a secret from terminal
- Delete an existing secret if you have one;
kubectl delete secret regcred - Create a new secret named
regcredwith your details in command-line;
sh
kubectl create secret docker-registry regcred --docker-server=<registry> --docker-username=<username> --docker-password=<password><registry>is your private container registry, e.ghttps://ghcr.io<username>is your username for the registry you want to log into<password>is your password for the registry
- Verify that the secret has been created successfully and Kubelet should be able to pull images from private registry
