TAK-OS DNS publishes external authoritative zones. Kubernetes cluster DNS remains a separate service. DNS clients use UDP and TCP 53; the console, management API, metrics and probes use an internal HTTP listener on 8080.
Install deploy/crds.yaml first; the workload starting point is
deploy/kubernetes.yaml and
deploy/ingress.example.yaml. They contain plain
Kubernetes resources. The separate TAK-OS platform deployment repository maintains
the ready-to-configure Orbit source under tak-os-dns/, optionally linked into this
checkout as orbit-deployment/. It contains one object per YAML file and a
deployment.json pinning the 2.0.0 image. The OrbitDeployment that selects that source
is managed by the platform. Examples below also show how to prepare a site-owned
adaptation; example snippets are not installed resources.
Choose deployment settings
Keep DNSZone, DNSRecords, PeerSite, settings and credential objects in POD_NAMESPACE.
Services, Ingresses and optional ExternalIPBindings (tak-os.org/v1) are read across
all namespaces; Nodes are cluster-scoped. ExternalIPBinding's CRD is owned by TAK-OS
External IP Operator and may be installed after DNS starts. Each refresh retries its
API without a pod restart. See generated records
for naming and declared-address semantics.
For each ingress-controller Service, set dns.tak-os.org/ingress: "true" and
dns.tak-os.org/ingress-class to its IngressClass name. Ingress manifests must set
spec.ingressClassName explicitly; default/legacy class selection is not inferred.
Only mapped classes produce host CNAMEs. Use dns.tak-os.org/ignore: "true" on a
Service, Ingress or ExternalIPBinding to exclude it. Ignoring a Service also excludes
its binding-derived records and class mapping. See the annotation reference
for manifests, multiple controllers and ambiguity handling.
When updating an Orbit source, sync both RBAC roles: tak-os-dns-read needs cluster-wide
list on externalipbindings in tak-os.org; move DNSZone/DNSRecords management into
the administration-namespace tak-os-dns-config Role. Move any existing static DNS CRs
from other namespaces into POD_NAMESPACE before upgrading. Use new object identities
when moving CRs; do not copy Kubernetes UID/resourceVersion fields. Old definitions
outside this namespace no longer contribute to DNS after a successful refresh.
| Decision | What to configure |
|---|---|
| Cluster identity | Set one stable CLUSTER_ID for all replicas in this cluster. Every other source cluster needs a different identity. Peer IDs must match those identities. |
| Namespace | The supplied resources use tak-os-dns. The process defaults to POD_NAMESPACE=default, but the DaemonSet obtains the actual namespace through the downward API. Keep namespaced resource metadata, Role/RoleBinding, ServiceAccount bindings and Ingress aligned. |
| Generated suffix | Set DOMAIN for Service and bare Node names. Generated names do not require a zone/SOA; the environment value does not create one. |
| External addresses | Choose addresses that already route to the intended nodes. Set DNS Service externalIPs for DNS routing. Ingress addresses come from annotated controller Services or their ExternalIPBindings. Kubernetes Service routing forwards to ready DNS pods on other nodes. |
| Zone publication | Create optional DNSZone metadata/SOA and independent DNSRecords. Arrange parent delegation/glue when publishing publicly; direct cached answers do not require them. Reverse zones need upstream reverse delegation. |
| Management access | Provide authenticated TLS Ingress and restrict direct HTTP Service/pod access. The application has no user authentication or TLS listener. |
| Image | Supply a tested image tag or digest that every node can pull. The literal image in the supplied manifest is a template. |
| Capacity and availability | Review DaemonSet eligibility/taints, requests/limits, source/peer size and expected query traffic. See capacity. |
See configuration for all environment variables, reload rules and validation, and record rules for names and address selection. All sample addresses in this guide are documentation addresses and must be replaced.
Orbit Deploy integration
Controller contract and scope
The locally inspected Orbit Deploy CRD defines k8s.tlspu.com/v1, kind
OrbitDeployment. Relevant fields are spec.source, path, ref, images,
replacements, secret and pause. There is no platformDefinition property in that
schema. A platform definition for DNS therefore means a set of manifests and optional
deployment.json in your platform Git repository, referenced by an OrbitDeployment.
Orbit Deploy reads YAML from the selected Git path, substitutes <!token!> values,
applies the rendered objects and reconciles removed objects. Its controller-side scope
depends on the namespace of the OrbitDeployment:
- In
kube-system, it may manage cluster-scoped resources and resources in other namespaces. This mode can install the complete DNS bundle, including CRDs, Namespace, ClusterRole and ClusterRoleBinding. - In another namespace, it manages only namespaced objects in that namespace. A tenant-mode DNS bundle requires an administrator to provision the Namespace CRDs and cluster-wide generated-source read permissions separately. Remove those cluster-scoped documents from the tenant source, and align every namespaced object and binding.
The DNS workload can remain in tak-os-dns while its platform-level OrbitDeployment
is in kube-system. These namespaces have different purposes. Do not copy Ipseity's
workload namespace or its broader write permissions into the DNS deployment.
This integration was checked against the sibling Orbit Deploy checkout's
initial-install/orbit-deploy-crd.yaml, README.md and orbit-deployments/, and the
sibling Ipseity orbit-deployment/default/ examples. It describes that controller
contract rather than guaranteeing compatibility with every historical Orbit Deploy
release. The platform checkout's tak-os-dns/ bundle includes a dedicated namespace,
three YAML CRDs, RBAC, runtime settings, DaemonSet, DNS and management Services, and
management Ingress. Its README indexes the individual files and site defaults.
Prepare a site-owned source
Use the maintained tak-os-dns/ bundle, or create a deployment directory in your
platform Git repository, for example platform/dns/, containing adapted copies of the
supplied manifests. Keep one Kubernetes object per YAML file. The source may be split
into CRD prerequisites, RBAC, CR definitions/settings, DaemonSet, Services and Ingress.
Ensure CRDs are Established before the dependent resources are applied; use a separate
prerequisite source/reconciliation phase if necessary. Keep each resource under one
reconciler's ownership.
For example, a site-owned platform/dns/deployment.json can declare:
{
"images": {
"tak-os-dns": "registry.example.com/platform/tak-os-dns:VERSION"
},
"replacements": {
"dns-namespace": "tak-os-dns",
"dns-cluster-id": "site-east",
"dns-domain": "example.com",
"dns-external-ips": "[\"192.0.2.10\",\"192.0.2.11\",\"192.0.2.12\"]"
}
}
Replace VERSION, the registry and all site values. Use those tokens in the adapted
manifests; for the relevant DaemonSet fields:
metadata:
namespace: <!dns-namespace!>
spec:
template:
metadata:
annotations:
tak-os-dns-image-hash: "<!tak-os-dns-hash!>"
spec:
containers:
- name: dns
image: <!tak-os-dns!>
env:
- {name: CLUSTER_ID, value: "<!dns-cluster-id!>"}
- {name: DOMAIN, value: "<!dns-domain!>"}
This is a fragment, not a complete DaemonSet. Preserve its other environment entries,
ports, probes, security settings and selectors. In the adapted DNS Service, use
externalIPs: <!dns-external-ips!> as a YAML list, retaining externalTrafficPolicy: Cluster and both DNS ports. Replace namespace references throughout the whole bundle.
Edit DNSZone/DNSRecords objects and bootstrap PeerSites as well; changing the DaemonSet
environment alone is insufficient.
Orbit Deploy supplies <!domain!>, inferred from a node hostname, along with
<!addresses!> for internal node IPs and <!external_addresses!> for external node
IPs. Their values may be unsuitable or empty for public authoritative DNS. The example
uses explicit site settings so the public zone suffix, stable identity and routed
addresses are deliberate. The maintained platform bundle defaults dns-cluster-id
and dns-domain independently to <!domain!>, and dns-external-ips to
<!external_addresses!>. Override those values in the selecting OrbitDeployment or
directory descriptor as needed. Clusters sharing a DNS suffix still require distinct
cluster identities; explicitly override dns-cluster-id when the derived domain is
shared or falls back to localhost. If using <!external_addresses!>, verify its rendered
family/address list and apply it to the DNS Service. Existing bundle EXTIPS entries
are accepted but do not affect Kubernetes Ingress records.
<!addresses!> is not an ExternalIP substitute.
The maintained management Ingress uses the platform's tak-os ingress class,
letsencrypt-prod certificate issuer and oauth2-proxy.<domain> authentication
endpoint. Configure those platform dependencies or adapt the Ingress to the site's
TLS/authentication provider. The bundle lets Kubernetes-generated records populate
the cache and leaves administrative record groups and peers to the UI or additional
GitOps YAML objects; the app creates its local TSIG Secret when absent.
Image tokens are resolved by Orbit Deploy; the generated <!tak-os-dns-hash!> can
change the pod template when image content changes. Explicit spec.images overrides the
matching deployment.json image throughout the source tree. Deployment-specific
spec.replacements overrides the directory's ordinary replacement values; image tokens
have higher precedence. Prefer versioned images or digests and a reviewed Git ref for
reproducible rollouts.
A platform administrator can prepare an OrbitDeployment such as:
apiVersion: k8s.tlspu.com/v1
kind: OrbitDeployment
metadata:
name: tak-os-dns
namespace: kube-system
spec:
source: https://git.example.com/platform/site-deployments.git
path: platform/dns
ref: reviewed-release
replacements:
dns-cluster-id: site-east
dns-domain: example.com
dns-external-ips: '["192.0.2.10","192.0.2.11","192.0.2.12"]'
The source URL, path and ref are placeholders. This is an example for your platform
repository, not a new resource supplied by this DNS repository. Private Git/image
authentication uses Orbit Deploy's spec.secret credential mechanism. Those credentials
are separate from the DNS peer-key Secret and from any node image-pull credentials
required by your registry setup.
Configuration and Secret ownership
The UI and GitOps can both manage the DNSZone, DNSRecords and PeerSite specs, settings ConfigMap and TSIG Secrets. Assign ownership deliberately per object. Discovery writes PeerSite status separately, leaving GitOps-owned bootstrap spec intact. Resource-version conflicts protect concurrent writes, not against a controller subsequently restoring its desired state.
For Git-owned objects, reconcile intended UI edits back to Git. For UI-owned objects
initially seeded by Orbit Deploy, the inspected controller supports
k8s.tlspu.com/no-update: "true" for in-place update suppression. It does not prevent
creation or deletion; review the deployed controller's separate no-delete policy before
adoption. The shipped manifests do not set either annotation.
Let the app generate its local TSIG Secret when initially absent, or provision a valid Secret first through GitOps/ESO. Do not seed an empty placeholder Secret: an existing invalid object is preserved and reported rather than overwritten. Import each remote site's private key when its transfers should become active; discovered sites can wait pending until then. App-created keys require no external generator. Never store real bundles in unprotected Git. Secret changes reload on local reconciliation without pod restart; no remote key distribution is performed. See peer setup.
Rollout and verification
Orbit Deploy status reports reconciliation, not authoritative DNS correctness. Inspect
the OrbitDeployment error/managed-object status and the DNS DaemonSet's rollout,
probes and per-pod status. Keep DNS available on every configured node through the
Service, with a DaemonSet pod on each eligible node and Service forwarding when a local
pod is unavailable.
Startup/liveness probes use /livez; readiness uses /readyz. A pod waits for valid
configuration, a valid local TSIG key, successful complete local synchronization and an
initial attempt against every configured peer cluster. Failed peers are retried after
startup. All peer caches are per pod and memory-only; gradual restarts preserve
availability through other ready replicas, while a full restart requires warm-up. Do not
substitute readiness for peer freshness monitoring.
Update image declarations in the deployment repository or its OrbitDeployment image
override, then let the reviewed GitOps rollout converge. Environment changes require new
pods; TSIG Secret changes hot-reload on the local reconciliation cycle. Keep
CLUSTER_ID stable. See upgrades for peer wire version
coordination, backup and rollback, and observability
for deployment checks and alerts.
Install using Kubernetes manifests directly
These commands are instructions for an operator with the intended context selected; they were not executed as part of documentation preparation. Use either your GitOps workflow or a deliberate manual ownership model for these resources.
Build and push the chosen image to your registry:
docker build -t your-registry/tak-os-dns:VERSION .
docker push your-registry/tak-os-dns:VERSION
Adapt the Kubernetes manifest: image, namespace, cluster identity, domain, external addresses, zones, nameserver records and peer credentials. Install the CRDs before their CRs, and preserve the ServiceAccount/ RBAC, both DNS transports and Cluster traffic policy. The local Secret is created if absent; settings may be created on first save. Then apply only the reviewed copies:
kubectl apply -f /path/to/adapted-crds.yaml
kubectl wait --for=condition=Established --timeout=60s crd/dnszones.dns.tak-os.io crd/dnsrecords.dns.tak-os.io crd/peersites.dns.tak-os.io
kubectl apply -f /path/to/adapted-kubernetes.yaml
kubectl -n tak-os-dns rollout status daemonset/tak-os-dns
kubectl -n tak-os-dns get pods,services
Adapt the Ingress example to your real management hostname, class, TLS Secret and authentication policy, then apply that reviewed copy. The placeholder class name does not implement authentication. The management Service remains ClusterIP; expose neither its console nor its API directly on the DNS Service.
From outside the cluster, test every external address on UDP and TCP, including an address of a node without a local DNS pod:
dig @192.0.2.10 ns1.example.com. A +norecurse
dig @192.0.2.10 ns1.example.com. A +norecurse +tcp
Only after verifying serving behaviour should an operator move parent delegation or nameserver/glue records. Verify management authentication separately and check peer imports on individual pods. The Kubernetes resource reference explains persisted state and permissions; troubleshooting covers failed startup and routing.
Local development and file mode
For a Docker-based local run, ./test.sh removes the previous named test container,
builds the image and starts it with writable file configuration, loopback DNS on 53 and
management HTTP on 80 (override DNS_PORT/HTTP_PORT as needed). See the container
runner for overrides and
configuration persistence.
With Go 1.26 or newer, run from the repository root on loopback-only, unprivileged ports:
cp examples/config.json /tmp/tak-dns-config.json
CLUSTER_ID=dev DOMAIN=example.com CONFIG_FILE=/tmp/tak-dns-config.json \
DNS_ADDR=127.0.0.1:1053 HTTP_ADDR=127.0.0.1:8080 \
go run ./cmd/tak-os-dns
Open http://127.0.0.1:8080 and query:
dig @127.0.0.1 -p 1053 ns1.example.com. A +norecurse
dig @127.0.0.1 -p 1053 ns1.example.com. A +norecurse +tcp
File mode disables Kubernetes discovery and uses static configuration plus peers.
DOMAIN remains required, but no Service/Node/Ingress/ExternalIPBinding records are synthesized. A
separate local TSIG file defaults to <CONFIG_FILE>.tsig.json, is generated if
initially absent and reloads with valid changes. The directory must be writable for its
initial generation and UI key saves. The configuration file is periodically reloaded;
invalid documents retain the last valid data. Console saves atomically replace the file,
so the process needs write permission on its parent directory. A read-only mounted file
supports reading but not console saves. File-content hashes provide optimistic edit
versions. There is no automatic backup or persistent peer cache in this mode. The sample
www alias targets app.default.example.com; file mode does not synthesize that
Service target. Add a static target when testing a complete alias-to-address answer
without discovery.
For Kubernetes discovery with local token or client-certificate credentials, omit
CONFIG_FILE and select a kubeconfig:
CLUSTER_ID=dev DOMAIN=example.com KUBECONFIG=/path/to/token-or-cert-kubeconfig \
POD_NAMESPACE=tak-os-dns CONFIGMAP_NAME=tak-os-dns \
DNS_ADDR=127.0.0.1:1053 HTTP_ADDR=127.0.0.1:8080 \
go run ./cmd/tak-os-dns
The current kubeconfig context must reference the intended API server, trusted CA and
user. Supported user credentials are bearer token/tokenFile or client
certificate/key files/base64 data. Credential-file paths resolve relative to the
kubeconfig; token files are reread on requests. Exec/auth-provider plugins and
insecure-skip-tls-verify are unsupported. The account needs the same API rights as the
deployed ServiceAccount, and the CRDs must already be installed.
If the local kubeconfig normally uses an exec plugin, a separate kubectl proxy can supply authenticated API access instead:
kubectl --context YOUR_CONTEXT proxy --address=127.0.0.1 --port=8001
In another terminal, omit both CONFIG_FILE and KUBECONFIG:
env -u CONFIG_FILE -u KUBECONFIG \
CLUSTER_ID=dev DOMAIN=example.com KUBE_API_URL=http://127.0.0.1:8001 \
POD_NAMESPACE=tak-os-dns CONFIGMAP_NAME=tak-os-dns \
DNS_ADDR=127.0.0.1:1053 HTTP_ADDR=127.0.0.1:8080 \
go run ./cmd/tak-os-dns
The env -u options remove inherited file-mode and kubeconfig settings for this
process: a configured kubeconfig otherwise still participates in client construction
even when an explicit API URL is set. Keep proxy and development listeners on loopback.
The proxy delegates its own Kubernetes credential authority to callers who can reach it.
See development implementation and testing for code structure, automated checks and container verification.
Client resolver expectations
Cached positives are authoritative without a zone/SOA. Known names missing a requested type return authoritative NOERROR/NODATA; a completely unknown name returns REFUSED, never NXDOMAIN. An enabled zone SOA is included in NODATA authority when available, but is not required. RD=true unanswered referrals are refused; RD=false iterative queries retain their NS/glue routing information.
The missing-type NODATA choice supports ordinary single-family names with musl AF_UNSPEC. It is normally terminal, so clients do not try another nameserver for a missing A/AAAA type of that known owner. Configure equivalent/converged mesh servers for availability. Do not split one owner's record types across independent resolv.conf servers expecting their answers to combine. Musl's parallel querying still allows a fast public negative to beat a private positive; tested TCP error paths can also terminate without alternate fallback. Use domain routing or an appropriate recursive layer for private/public integration. See resolver compatibility for exact versions, observations and limits.
For an independently known owner below a parent delegation, missing-type NODATA does not attach the parent's SOA. Only an applicable uncut zone can supply SOA authority; independent existence does not promote an existing parent-owned glue RRset into an authoritative answer.
