Skip to main content
Version: 5.x

Image Pull Secrets

createPullSecret

The createPullSecret option expects a boolean that tells DevSpace if a pull secret should be created for the registry where this image will be pushed to.

  • If there are multiple images with the same registry and any of the images will define createPullSecret: true, the pull secret will be created no matter if any of the other images using the same registry explicitly defines createPullSecret: false.
  • There is no need to change your Kubernetes manifests, Helm charts, or other deployments to reference the pull secret because DevSpace will add the pull secret to the service account which deploys your project. This ensures that the pull secret is automatically considered by Kubernetes although it is not explicitly referenced by your pods.
  • After running devspace deploy or devspace dev, you should be able to see the auto-generated pull secrets created by DevSpace when you run the command kubectl get serviceaccount default -o yaml and take a look at the imagePullSecrets section of this service account.

Default Value For createPullSecret

createPullSecret: true

Example: Different Dockerfiles

images:
backend:
image: john/appbackend
createPullSecret: false
frontend:
image: john/appfrontend

Explanation:

  • The first image backend will be pushed to Docker Hub and DevSpace will not create a pull secret for Docker Hub because createPullSecret is false. This makes sense for public images where no login is required to pull the image or where you want to manage the pull secret yourself.
  • The second image frontend will be pushed to gcr.io and DevSpace will create a pull secret for gcr.io because createPullSecret defaults to true, so Kubernetes can pull the image from gcr.io.