How To Pull Container Images From a Private Repository
Problem
Some pods will need to launched using container images stored in a private repository.
Environment
- Platform9 Managed Kubernetes - All Versions
- Private Docker/ECR/GitHub Container Repository
Procedure
- You can use the following base command to create a Secret which can be used to pull images from a private repository
kubectl create secret docker-registry
. The login details will depend on which service provider you are using.- For a Private Docker Repository
$ kubectl create secret docker-registry regcred --docker-server=<your-registry-server> --docker-username=<your-name> --docker-password=<your-password> --docker-email=<your-email>
- For ECR
$ kubectl create secret docker-registry regcred --docker-server=<aws_account_id.dkr.ecr.region.amazonaws.com> --docker-username=AWS --docker-password=<ECR_Login_Password> --docker-email=<AWS_Email_Account>
- For a Private Docker Repository
##
Was this page helpful?