Skip to main content

Your default zone

Beta

Being rolled out. The interface described here is the one of the next release: it may still change, and may not be enabled on your tenant yet.

The default zone and App URLs are available; free-form records and multi-level names are arriving gradually on tenants.

Each tenant receives a DNS zone, <tenant>.dev.stackngo.app, without configuring anything. Your exposed Apps publish their name there automatically, and you can add your own records (A, AAAA, CNAME, TXT, MX) at any depth.

Prerequisites​

  • The sng CLI installed and authenticated: sng sso login, then sng tenant use acme.
  • A cluster and a tenant: sng config show.
  • To write records: the dns:write right, included in the managed policies readwrite and admin. See Identity and access.

1. Know the name of your zone​

The zone name is your tenant name followed by dev.stackngo.app:

sng config show

For the tenant acme, the zone is acme.dev.stackngo.app. You do not have to create it, and no command lists it: sng dns zone list only shows the domains you bring.

2. Names published by your Apps​

An App service that declares ingress is published under <service>-<app>.<tenant>.dev.stackngo.app, or under the name chosen in ingress.domain:

web.yml
apiVersion: deploy.stackngo.io/v1alpha1
kind: App
metadata:
name: web
spec:
services:
web:
image: nginxinc/nginx-unprivileged:1.27
ports: ["8080"]
ingress: { port: 8080 } # https://web-web.acme.dev.stackngo.app/
sng apply web.yml

The platform publishes the name (TTL of 300 s) and removes it when the exposure disappears. You do not write a record for an App. Details: Domains on an App.

3. Add a record​

Without --zone, sng dns record set writes to your default zone. The name is relative to the zone:

sng dns record set api.preview --type CNAME --target my-api.netlify.app
enregistrement api.preview.acme.dev.stackngo.app CNAME créé : my-api.netlify.app (id api-preview-cname-5e1d0c3a)
effectif dans quelques minutes : sng dns record describe api-preview-cname-5e1d0c3a

The same record as a manifest:

preview-api.yml
apiVersion: dns.stackngo.io/v1alpha1
kind: DNSRecord
metadata:
name: preview-api
spec:
name: api.preview # → api.preview.acme.dev.stackngo.app
type: CNAME
targets: ["my-api.netlify.app"]
sng apply preview-api.yml

Details on types, targets and conflicts: Records.

Verification​

sng dns record list
ID FQDN TYPE TARGETS TTL READY REASON
api-preview-cname-5e1d0c3a api.preview.acme.dev.stackngo.app CNAME my-api.netlify.app 300 yes Published

READY is no (sync…) as long as the platform has not yet taken the record into account. Then, from any machine:

dig +short api.preview.acme.dev.stackngo.app CNAME
my-api.netlify.app.

Reserved names​

Some names in your zone belong to the platform. A record or an ingress.domain that targets them is refused:

NameUse
status.<tenant>.dev.stackngo.app and everything below ittenant status page
any _acme-challenge labelvalidation of TLS certificates
any _stackngo-verify labelproof of ownership of a brought domain
any label starting with extdns-technical records of the platform
sng dns record set status --type TXT --target hello
status.acme.dev.stackngo.app : réservé aux status pages de la plateforme

Going further​

  • Depth: a.b.c.acme.dev.stackngo.app is allowed, for a record as for an ingress.domain. Only the apex acme.dev.stackngo.app is refused to an App; a TXT or MX record at the apex (@) is accepted.
  • Another tenant's zone: a record can only target your zones. Writing --zone autre.dev.stackngo.app is refused (another customer's default zone cannot be targeted); a manifest that attempts it stays ZoneNotOwned and nothing is published.
  • First come: a name already published by an App or another record is in conflict. See Records.
  • One scope: the zone is the tenant's. A given name and type can only be declared once in the tenant.
  • Name servers, App TTL: chosen by the platform, cannot be modified.

See also​