The easiest way to connect a domain to your deployment is to run the following command within your project directory:
Choose via domain to connect a domain. After choosing this option, there are two options:
1. If you are using DevSpace Cloud,...
DevSpace will automatically provide a subdomain for you.
If you want to connect a custom domain (not the auto-generated subdomain), you need to add the domain via the UI of DevSpace Cloud:
- Go to "Spaces" (e.g. via https://app.devspace.cloud/spaces)
- Select the Space, you want to connect the domain to.
- Open the "Network" tab.
- Click on the "Create Ingress" button.
- Specify an ingress name (e.g. "my-ingress").
- Enter your domain as "Hostname".
- If the message "Click here to verify the hostname." occurs, click on the link and follow the steps to verify your hostname.
- Enter "/" or any other path as "Host Path".
- Click the "Create Ingress" button.
2. If you are not using DevSpace Cloud,...
DevSpace will ask you to enter a domain name and tell you how to configure the DNS records for this domain manually.
Here are some steps to debug issues with your application when your domain is not able to reach your application.
Listen On All Interfaces
Make sure your application is running on
0.0.0.0 and not on
localhost. If you see a log message in your container logs such as
Listening on localhost:PORT or
Listening on 127.0.0.1:PORT, you need to change the configuration of your application, so that it starts listening on
0.0.0.0 instead of
This is often the problem when you are able to use
via localhostbut not with the
Check For Failing Containers
Make sure none of your containers is constantly restarting (
Restarts > 0) or unable to starting (
Status != Running):
kubectl get po
Check Services and Endpoints
Make sure you have at least one service for your main application configured:
kubectl get svc
And make sure all your services have at least one endpoint:
kubectl get ep