Devspace deploy error: pullSecrets[0].registry: cannot be empty

368 Views Asked by At

I'm studying how to deploy a django application with kubernetes, I found this tutorial, which explains about the Devspace tool, so that following the tutorial just like it returns me a message that I can't solve. the message is this: enter image description here

returns only this [fatal] pullSecrets[0].registry: cannot be empty

Can someone help me ?

2

There are 2 best solutions below

0
On BEST ANSWER

DevSpace maintainer here. Check your devspace.yaml and you'll see that there is a pullSecrets section defined and the first entry in this section has registry either not defined or empty string.

To fix this, you can either remove the entire pullSecrets or provide a valid registry hostname + username and password. For the username and especially for the password, you should use variables such as ${REGISTRY_PASSWORD} and then set them via environment variables in your terminal or let DevSpace set them via devspace set var REGISTRY_PASSWORD=xxx etc.

2
On

First thing in your setup at very first you missed two steps

in which it's asking about the docker registry and username & authentication.

If you will pass the detail you won't face any issue and secret will get created automatically.

You have to set the value for pull secret to true

createPullSecret: true

pull seceret is used by Kubernetes config when you have to fetch the container (docker) image from the private container repository for example private docker repository.

If your config pull already exist but you have not created it you can create it manually by providing a few details

kubectl create secret docker-registry my-pull-secret --docker-server=[REGISTRY_URL] --docker-username=[REGISTRY_USERNAME] --docker-password=[REGISTRY_PASSWORD] --docker-email=[YOUR_EMAIL]

Read more at : https://devspace.cloud/docs/v3.5.18/image-building/registries/pull-secrets

There is same issue reported previously : https://github.com/loft-sh/devspace/issues/1317