Kubernetes with Helm

Two charts, CRDs as the source of truth, replicas that answer from memory through an apiserver outage, and aggregated RBAC roles.

In a cluster the kudurru.io CRDs are the configuration: zones, record sets, lists, client groups and policies are objects you kubectl apply, review in Git and sync with your GitOps tool. Every replica watches them, serves from memory and keeps the last good snapshot in local.db, so DNS keeps answering while the apiserver is down. One replica, elected with a Lease, runs the controller (serials, list fetching, NOTIFY).

Install

Two charts, so that helm uninstall never deletes the CRDs and with them every object: kudurru-crds and kudurru. The Helm guide covers the install, the first login, every deployment shape and the values; kustomize has the same manifests as overlays.

kubectl create namespace kudurru-system
kubectl label namespace kudurru-system pod-security.kubernetes.io/enforce=restricted
helm install kudurru-crds oci://ghcr.io/robertherbaugh/charts/kudurru-crds --version 0.2.0
helm install kudurru oci://ghcr.io/robertherbaugh/charts/kudurru --version 0.2.0 \
  --namespace kudurru-system --set replicaCount=1
kubectl create namespace dns && kubectl create namespace apps   # the samples' namespaces
kubectl apply -k deploy/kustomize/samples/
kubectl get zone,rrset,blocklist,cg,pol -A

The example starts one replica without a license key. Two or more replicas need a key: without one kudurru runs as one node, so changes through the API and the dashboard answer 402 license_required until you add a key (a free personal key covers 3 nodes) or set replicaCount=1 (license key). DNS answering is not affected.

The defaults follow the Restricted Pod Security Standard: two replicas, a PodDisruptionBudget, topology spread and one mixed-protocol LoadBalancer Service with externalTrafficPolicy: Local, because client addresses are what client groups and the query log are about.

Choose a shape

GoalWhere
Pin the Service address with MetalLB or kube-vipShapes: vip.provider
A load balancer without mixed-protocol supportservice.dns.splitProtocols=true
One pod per node on the host networkhostNetwork.enabled=true
One node and no CRDsmode=standalone
dnsdist in front (DoT/DoH/DoQ, packet cache)Edge: edge.enabled=true
DNS that starts before the control planepriorityClassName, persistence.local.enabled

Objects and settings

  • The objects: CRD reference, with the validation the apiserver enforces. kubectl explain dnszone.spec works as well.
  • The server settings (config.node and config.settings in the values): settings reference. Keys flagged restart roll the pods through the ConfigMap checksum.
  • external-dns writes records through kudurru's webhook provider (externalDNS.webhook.*; it needs a license key that includes integrations); the records land in DNSRecordSet objects managed by integration:external-dns.

Access

People sign in with OIDC (auth.oidc.providers) or the local admin; OIDC and roles other than the built-in administrator need a license key (what a key unlocks). Their roles come from role bindings (viewer, auditor, operator, zone-admin, admin, scoped per zone). ServiceAccount tokens are authorized with a SubjectAccessReview against the aggregated ClusterRoles the chart renders from internal/rbac/permissions.yaml; with rbac.aggregateToDefaultRoles the built-in view, edit and admin roles carry the matching kudurru permissions. See RBAC.

Writes run as the kudurru ServiceAccount by default. With auth.kubernetes.mode: impersonate in the values, every API write of a kudurru.io object is also sent as the signed-in person or service account (kudurru:user:<name>, kudurru:group:<group>, or the ServiceAccount itself), so Kubernetes RBAC must allow it as well and the apiserver audit log names who made it. OIDC users signed in to the dashboard carry no groups there, so bind them by user name. The chart then grants kudurru the impersonate verb, which lets a compromised kudurru pod act as anyone in the cluster; keep the default unless you need the apiserver to decide and record each write. Bind the <release>-admin ClusterRole to kudurru:user:admin (and the other names you use) before you switch. Authenticator apps and the local-user commands are not available on Kubernetes; use your identity provider's second factor.

Day two

  • Runbooks: cold start without the apiserver, rotating the encryption key, upgrades.
  • Upgrading from 0.1.x: follow the ordered upgrade notes. The CRD chart comes first, and private IAM Secrets need the offline IAM migration before any 0.2 pod starts.
  • Monitoring: ServiceMonitor or PodMonitor, PrometheusRule and the Grafana dashboard from the chart.
  • kudurru nodes lists the replicas with their readiness and the leader; kudurru doctor diagnoses one node's configuration and environment.

Source: docs-site/content/start/kubernetes.md