Article · 5 min read · Servers and performance

Your own domains

Connect the DNS provider that holds your domain, and kubespin keeps the records your apps and servers need up to date. You use your own key, for your own account, and nothing is redeployed.

Connect the DNS provider that holds your domain, and kubespin keeps the records your apps and servers need up to date. You use your own key, for your own account, and nothing is redeployed.

kubespin works with IONOS, Cloudflare and AWS Route 53.

What each provider needs

Provider The key Where to make it
IONOS A Hosting DNS API key, in two parts: prefix.secret developer.hosting.ionos.com
Cloudflare An API token limited to Zone › DNS › Edit on the domains you choose Cloudflare’s My Profile › API Tokens
AWS Route 53 An access key ID and secret for an IAM user allowed only route53:ListHostedZones, route53:ListResourceRecordSets and route53:ChangeResourceRecordSets AWS IAM

kubespin checks the key straight away by listing your domains, and says what’s wrong if it can’t, for example “IONOS refused the key: check both parts, prefix.secret”. The key is sealed when it’s saved, and is never shown again, sent to a server or written to a log. See kubespin: Secrets and encryption.

You can connect more than one provider, or two accounts at the same provider.

In kubespin

Connect a provider

  1. Choose DNS in the menu, then the Domains tab.
  2. Choose Connect a provider, pick IONOS, Cloudflare or Route 53, and paste the key.
  3. kubespin lists the domains the key can see. Tick the ones kubespin may use.

kubespin reads each chosen domain’s records once, so it knows what’s already there. It changes nothing at this point.

A domain belongs to one kubespin account. If another account already manages it, kubespin says so and won’t add it.

Which records kubespin changes

Only its own. kubespin keeps a list of every record it made, with why (an app, a server, a certificate), and changes or removes only those. Mail, TXT and every other record stays as it is.

Open a domain to see:

  • Kept by kubespin: the records on its list;
  • the other records, read only;
  • Changes: every record kubespin added, changed or removed, with who, when, and the value before and after.

Needs you

When kubespin needs a record that already exists with another value, it doesn’t change it. The record waits under Needs you, with what’s there now, what kubespin wants, and why.

  • Authorise changes it and keeps the old value, so it can be put back later.
  • Leave it keeps it as it is. The app’s name then shows as not pointed.

Every hour kubespin compares its records with the provider’s. A record changed or deleted at the provider isn’t changed back: it appears under Needs you, for example “www.example.com was changed at IONOS to 1.2.3.4; kubespin had 5.6.7.8”.

  • Put back sets kubespin’s value again.
  • Keep theirs keeps the provider’s value and takes the record off kubespin’s list.

Manage a provider

Choose Manage on its card:

  • Choose domains adds or removes domains;
  • Replace key swaps the key and keeps the domains and records;
  • Disconnect… forgets the key. Your domains and the records at the provider stay as they are.

A key that stops working (revoked, or the account unpaid) shows Not working, and you’re told once.

Command line

The kubespin command has no DNS commands yet. Use kubespin api, or a script with an API token:

bash
kubespin api GET /network/dns/domains

API

bash
curl -s -X POST https://kubespin.io/api/v1/network/dns/connections \
  -H "Authorization: Bearer $KUBESPIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"provider": "cloudflare", "creds": {"token": "…"}}'

It returns the provider (id, label, state) and its zones, each with used and taken (managed by another account). The fields in creds are key for IONOS, token for Cloudflare, and access_key and secret_key for Route 53.

  • PUT /api/v1/network/dns/connections/{id}/zones with {"domains": ["example.com"]} chooses the domains.
  • GET /api/v1/network/dns/domains lists the providers, their domains and everything under needs.
  • GET /api/v1/network/dns/zones/{id} returns a domain’s kept records, others and changes.
  • POST /api/v1/network/dns/records/{id}/authorise, /leave, /put-back or /keep-theirs answers a record under Needs you.
  • PUT /api/v1/network/dns/connections/{id}/key replaces the key; DELETE /api/v1/network/dns/connections/{id} disconnects.

[!permissions] Permissions Area: Domains and names

Step Needs Default roles
See providers, domains and records View Admin, Developer, Operator, Viewer
Connect, choose domains, replace a key, answer Needs you Manage Admin

API token: Read only to look; Read and change for the rest.