Article · 5 min read · Servers and performance
Your own names on apps
Give an app a name in your own domain, such as www.example.com or cloud.example.com. Each app has a Domains tab for this. kubespin writes the record, gets the certificate, and keeps both up to date.
Give an app a name in your own domain, such as www.example.com or cloud.example.com. Each app has a Domains tab for this. kubespin writes the record, gets the certificate, and keeps both up to date.
The name’s domain can be one you’ve connected on DNS › Domains (kubespin: Your own domains), or any other domain, where you add the record yourself.
How kubespin picks the way in
| The app’s server | The record | Who serves the name |
|---|---|---|
| Has a public address and Plesk | An A record to the server (and AAAA if it has IPv6) | Plesk on that server, with a Let’s Encrypt certificate |
| Is at home, or reached through the agent’s tunnel, and on the mesh with one of your servers that has a public address and Plesk | An A record to that server | Your server in front, which reaches the app over the mesh. See kubespin: Your own server in front. |
| Is at home, with none of your servers able to be in front | A CNAME to the app’s generated name, or an A record to kubespin’s host for a domain’s apex or an app without a generated name | kubespin’s host, which sends visitors down the agent’s tunnel. This uses your plan’s starter allowance (kubespin: The starter allowance). |
Visitors to a name on your own server never pass through kubespin. kubespin’s host is the fallback, for when none of your servers can be in front.
Planned: a server with a public address but no Plesk can’t serve your own name yet. kubespin says so when you add one. Its own edge proxy, for servers without a web server, will cover this.
In kubespin
Add a name
- Open the app from Deployments and choose the Domains tab.
- Type the name, for example
www.example.com, and choose Add. - kubespin finds the connected domain it belongs to and writes the record:
- if a record with that name already points somewhere else, it waits under Needs you on DNS › Domains. Authorise the change there, and kubespin carries on;
- if the domain isn’t connected, the tab shows the record to add at your DNS provider, such as
www.example.com A 203.0.113.10. kubespin checks for it every 15 minutes, or when you choose Check now.
- Once the name resolves where it should, kubespin sets it up on the server in front and gets its certificate. The name shows Live.
Each name shows its state (Waiting for DNS, Setting up, Needs you, Live or Failed) and how it’s reached, for example “Through your server in front, over the mesh · A 203.0.113.10 kept by kubespin”.
When you make a new app, the Domain field offers your connected domains, or another one with a note that you’ll add the record yourself.
A name Plesk already serves
kubespin doesn’t take over a site Plesk already has. The name shows Take over the Plesk site: choose it to point that site at the app. Its own settings are kept, and put back when you remove the name.
Apps that keep their own names
Some apps only answer on names they know. kubespin tells Nextcloud its names with Nextcloud’s own tool (trusted domains, HTTPS, and the servers in front) after each deploy and when a name goes live, so a name added later doesn’t get “untrusted domain”. If Nextcloud is still setting itself up, kubespin finishes the job within 15 minutes.
Remove a name
Choose Remove, then again to confirm. kubespin removes the record it made, and the Plesk site it made. A record it took over with Authorise is put back to its old value.
Kept up to date
- A server’s public address changes: every record pointing at it moves.
- The app moves to another server: its names follow it (kubespin: Move an app to another server).
- The app is deleted: its names, records and Plesk sites are taken down.
When a name doesn’t work
Choose Test the route on the same tab. It follows each name the way a visitor comes in and names the first step that fails. See kubespin: Test the route.
Command line
The kubespin command has no domain commands yet. Use kubespin api, or a script with an API token:
kubespin api POST /deployments/$APP_ID/domains '{"name": "www.example.com"}'
API
curl -s -X POST https://kubespin.io/api/v1/deployments/$APP_ID/domains \
-H "Authorization: Bearer $KUBESPIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "www.example.com"}'
It returns the name with how (direct, front, edge or manual), state, the record kubespin wants, and any error.
GET /api/v1/deployments/{id}/domainslists the app’sgeneratedname, itsdomains, and yourconnecteddomains.POST /api/v1/deployments/{id}/domains/{name id}/checkchecks a name now.POST /api/v1/deployments/{id}/domains/{name id}/take-overtakes over a Plesk site.DELETE /api/v1/deployments/{id}/domains/{name id}removes a name.
[!permissions] Permissions Area: Deployments
Step Needs Default roles See an app’s names View Admin, Developer, Operator, Viewer Add, check, take over or remove a name Manage Admin, Developer API token: Read only to look; Read and change for the rest.
Your plan sets how many of your own names you can use: see kubespin: Acceptable usage limits.