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 definescreatePullSecret: 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
ordevspace dev
, you should be able to see the auto-generated pull secrets created by DevSpace when you run the commandkubectl get serviceaccount default -o yaml
and take a look at theimagePullSecrets
section of this service account.
Default Value For createPullSecret
createPullSecret: false
Example: Different Dockerfiles
images:
backend:
image: john/appbackend
frontend:
image: dscr.io/${DEVSPACE_USERNAME}/appfrontend
createPullSecret: true
Explanation:
- The first image
backend
will be pushed to Docker Hub and DevSpace will not create a pull secret for Docker Hub becausecreatePullSecret
defaults tofalse
. 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 dscr.io and DevSpace will create a pull secret for dscr.io, so Kubernetes is able to pull the image from dscr.io.