Sometimes, we need to pull image from private container registry in Jenkins agent pod. To do this, Please follow the steps below to setup and use the credentials. Create a secret with docker-registry type in Kubernetes # kubectl create secret docker-registry mycr --docker-server=<CR_SERVER> --docker-username=<CR_USER_NAME> --docker-password=<CR_USER_PASSWORD> --docker-email=<CR_USER_EMAIL> In the yaml specified in the Jenkinsfile, use the secret in imagePullSecrets.