Network¶
The cluster uses a single domain (PRIVATE_DOMAIN) split across two gateways — one for external access via Cloudflare, one for internal access via AdGuard Home DNS.
Physical Topology¶
Two racks: a garage rack carrying the gateway, core switch and WAN, and an office rack carrying the cluster and NAS, joined by a single tagged trunk.
flowchart TB
ISP([ISP - fiber])
ONT[ONT]
UCG[UCG-Max gateway\nVLAN 48 IP 192.168.48.254]
subgraph GAR[Garage rack]
SW[USW-Pro-Max-16-PoE\ncore switch]
AP1[U7 Pro - salon]
AP2[U7 Pro - upper floor]
end
subgraph OFF[Office rack]
ToR[ToR switch]
QNAP[QNAP TS-251D\n192.168.50.8]
subgraph K8S[Cluster - VLAN 48]
mc1[mc1\n192.168.48.2]
mc2[mc2\n192.168.48.3]
mc3[mc3\n192.168.48.4]
nv1[nv1 - Jetson Orin NX\n192.168.48.5]
end
end
ISP --> ONT
ONT -->|WAN| UCG
UCG -->|2.5 GbE| SW
SW --> AP1
SW --> AP2
SW -->|2.5 GbE trunk\nnative 10, tagged 48 + 50| ToR
ToR --> mc1
ToR --> mc2
ToR --> mc3
ToR --> nv1
ToR --> QNAP
VLANs¶
VLAN ID always equals the third octet of the subnet. The gateway is the UCG-Max on every VLAN.
| Network | VLAN | Subnet | Gateway | Purpose |
|---|---|---|---|---|
| Trusted | untagged | 192.168.10.0/24 |
.1 |
PCs, phones, consoles, TVs |
| IoT | 40 | 192.168.40.0/24 |
.1 |
Smart home + cameras |
| Cluster | 48 | 192.168.48.0/24 |
.254 |
Talos nodes |
| Servers | 50 | 192.168.50.0/24 |
.1 |
QNAP |
| Guest | 60 | 192.168.60.0/24 |
.1 |
Guest WiFi |
VLAN 48's gateway is
.254, not.1.192.168.48.1is the Talos shared control-plane VIP (k8s.PRIVATE_DOMAIN, see below) and predates the network build. Putting the UCG-Max on.1would collide with it. This is the one deliberate exception to the "gateway is.1" convention.
Cluster and Servers sit in a shared Infra firewall zone with intra-zone
allow-all, so the nodes reach the QNAP (NFS) and AdGuard (DNS) on VLAN 50
with no explicit policy. DHCP is disabled on VLAN 48 — every node address is
static in its Talos config.
The node switch ports (USW Flex 2.5G 8, ports 1–4 for mc1, mc2, mc3, nv1) carry
Cluster (48) untagged with tagged VLAN management Block All (since
2026-11-30). Nothing in the cluster uses a tagged VLAN, and with tagged VLANs
passed a privileged pod could open a VLAN sub-interface and reach IoT or Guest
at layer 2 past the firewall. Cilium counts any tagged frame that still
arrives as a VLAN_FILTERED drop (hubble_drop_total), so a non-zero rate
there means a port lost this setting.
Every static host must use a
/24mask. These subnets were once one flat192.168.48.0/22. A host left on/22treats192.168.48.0–192.168.51.255as on-link and ARPs for off-VLAN peers instead of routing to them, so traffic works one way and replies vanish — and only for peers that fall inside the stale range, which makes it look like a firewall rule. This bit the Talos nodes, the RPi and the QNAP during the migration.
Gateway Architecture¶
| Gateway | IP | Access | DNS | Entry point |
|---|---|---|---|---|
envoy-external |
192.168.48.20 | Internet | Cloudflare | Cloudflare Tunnel (cloudflared) |
envoy-internal |
192.168.48.21 | Home network only | AdGuard Home | Direct L2 (Cilium) |
Both gateways are implemented with Envoy Gateway using the Kubernetes Gateway API. TLS is terminated at the gateway using a wildcard certificate issued by cert-manager via Cloudflare DNS01 challenge.
DNS¶
Two external-dns controllers run in parallel, each scoped to its own gateway by annotation filter (external-dns.alpha.kubernetes.io/controller):
- cloudflare-dns — watches resources annotated
controller: external, writes records to Cloudflare DNS (proxied). Sources:DNSEndpointCRDs +gateway-httproutefromenvoy-external. - adguard-dns — watches resources annotated
controller: internal, writes records to the in-cluster AdGuard Home primary (viahttps://agh.PRIVATE_DOMAIN/control;adguard-home-synccopies them to the replica). Sources:DNSEndpointCRDs +gateway-httproutefromenvoy-internal.
DNS flow¶
- Clients: every VLAN's DHCP hands out
192.168.48.25and192.168.48.31(both AdGuard Home instances, both blocking). The UCG-Max is deliberately not a client resolver: clients do not reliably prefer the first server, and the UCG-Max knows no internal names and blocks nothing. IPv6 DNS uses the two ULAs below. - AdGuard upstreams / reverse lookups: the UCG-Max (
192.168.48.254) answers reverse lookups for local clients. - Nodes and pods: see "Resolver chain for cluster pods and nodes" below.
Internal DNS records (AdGuard Home)¶
Static records are defined as DNSEndpoint CRDs in cluster/apps/system/adguard-dns/templates/dnsendpoints.yaml:
| Record | Type | Target | Purpose |
|---|---|---|---|
k8s.PRIVATE_DOMAIN |
A | 192.168.48.1 | Cluster VIP (kube-apiserver) |
qnap.PRIVATE_DOMAIN |
A | 192.168.50.8 | QNAP NAS |
Per-app A records pointing to 192.168.48.21 are created automatically by adguard-dns external-dns
from each HTTPRoute annotated with controller: dns-controller attached to envoy-internal.
Resolver chain for cluster pods and nodes¶
Nodes resolve through 192.168.48.25 and .31 (the two AdGuard instances), then 192.168.48.254 (UCG-Max)
as a last resort (see provision/talos/patches/all/20-nameservers.yaml). The UCG-Max knows no internal-only names
and blocks nothing, so it must never be picked while AdGuard is up.
CoreDNS is not deployed by Talos (cluster.coreDNS.disabled: true) and Talos offers no Corefile customisation,
so it is deployed by ArgoCD from the upstream coredns Helm chart (cluster/apps/system/coredns/), as the Talos maintainers recommend. The kubelet clusterDNS is pinned to the kube-dns Service IP 10.96.0.10 in the Talos templates. The forward . /etc/resolv.conf block uses
policy sequential; the default random sent about a third of pod queries to the UCG-Max, which broke internal
names and ad blocking. CoreDNS reads the node resolver list only at pod start, so restart it after changing
node nameservers.
IPv6 DNS for AdGuard¶
The cluster is IPv4-only, so the DNS LoadBalancers cannot be dual-stack. Each AdGuard pod instead gets a second,
IPv6-only macvlan interface (vlan48-v6 NetworkAttachmentDefinition, static address) and listens on it:
| Instance | IPv6 address |
|---|---|
| primary | fd80:c04a:5687:48::25 |
| replica | fd80:c04a:5687:48::31 |
No bind_hosts change is needed: AdGuard's 0.0.0.0 listener is dual-stack on the pod's sockets (:::53), so it
answers on the macvlan address as soon as the interface exists. Verified by querying fd80:c04a:5687:48::25 from another
VLAN 48 pod (answers resolve, ad domains return 0.0.0.0). Set both addresses as the manual IPv6 DNS servers in UniFi.
The pod gets an extra SLAAC address and the RA default route on net1 as well; both are harmless.
External DNS records (Cloudflare)¶
There are no static external records any more (the old haas.PRIVATE_DOMAIN CNAME was removed). Everything is published from HTTPRoutes.
HTTPRoutes attached to envoy-external are automatically published to Cloudflare by external-dns.
UPS monitoring (NUT)¶
The CyberPower UPS is connected by USB to the QNAP, which serves it over NUT (qnapups on 192.168.50.8:3493; the QNAP only answers the IPs on its allow list: the four node IPs 192.168.48.2-5, plus anything else added there). All Talos nodes run the nut-client extension (provision/talos/patches/all/, the nut-client ExtensionServiceConfig) as secondaries: MONITOR ${TALHELPER_UPSMONHOST} 1 ${TALHELPER_UPSMONUSER} .... TALHELPER_UPSMONHOST (qnapups@192.168.50.8), the user and the password are Bitwarden values read through .envrc, so a change needs Bitwarden first, then task talos:generate and talosctl apply-config per node (the extension service restarts on its own, no reboot). Until 2026-10-04 the NUT server was the RPi (qnapups@192.168.50.9); moving the USB cable to the QNAP removed that dependency. Check with talosctl -n <node> logs ext-nut-client: it should show UPS: qnapups@... (secondary) and no connect failed.
External Access via Cloudflare Tunnel¶
cloudflared runs 2 replicas in the cluster and connects to Cloudflare's network. Incoming requests from the internet are routed by Cloudflare to the envoy-external gateway. No ports need to be forwarded on the home router.
The ArgoCD GitHub webhook host is one of these routes, restricted by a WAF rule to GitHub's delivery ranges: see ArgoCD GitHub webhooks.
IP Allocation¶
This is the single source of truth for addresses on VLAN 48. Update it in the same PR that assigns or moves an address, and run the checks below before picking one: the docs have been wrong about free addresses before.
Ranges on VLAN 48 (192.168.48.0/24)¶
| Range | Use |
|---|---|
.1 |
Control-plane VIP (kube-apiserver) |
.2–.5 |
Nodes (static in provision/talos/patches/node/) |
.6–.19 |
Unused |
.20–.50 |
Cilium LoadBalancer pool pool |
.51–.59 |
Cilium LoadBalancer pool coder-pool (Coder workspace SSH services) |
.60–.69 |
Static addresses for pods with a Multus macvlan net1 interface. Outside every LB pool; not known to Cilium, so a clash is silent |
.70–.253 |
Unused |
.254 |
UCG-Max, VLAN 48 gateway (also the nodes' NTP source and DNS resolver) |
Cilium LB IPAM (cluster/apps/core/cilium/templates/config.yaml) has two pools and neither has a serviceSelector, so a LoadBalancer service without a fixed IP can draw an address from either pool. Always set a fixed IP with lbipam.cilium.io/ips: "192.168.48.XX"; services that deliberately share an IP also set lbipam.cilium.io/sharing-key. coder-pool used to span .51–.70, which overlapped the macvlan range; it now stops at .59 so an auto-assigned address can never land on a pod-owned one.
Allocations¶
| IP | Used by |
|---|---|
192.168.48.1 |
Cluster VIP (kube-apiserver) |
192.168.48.2 |
mc1, control plane node |
192.168.48.3 |
mc2, control plane node |
192.168.48.4 |
mc3, control plane node |
192.168.48.5 |
nv1, Jetson Orin NX worker |
192.168.48.20 |
envoy-external gateway |
192.168.48.21 |
envoy-internal gateway |
192.168.48.22 |
Jellyfin |
192.168.48.23 |
Minecraft Bedrock |
192.168.48.24 |
alloy-router-syslog (monitoring: router syslog receiver) |
192.168.48.25 |
AdGuard Home primary (DNS, live; IPv6 fd80:c04a:5687:48::25) |
192.168.48.26 |
MQTT broker (Mosquitto, mqtt.PRIVATE_DOMAIN) |
192.168.48.27 |
Home automation voice services, shared (Whisper, Piper, OpenWakeWord) |
192.168.48.28 |
Vintage Story |
192.168.48.29 |
WoW, shared (auth and world server) |
192.168.48.30 |
anytype any-sync services, shared |
192.168.48.31 |
AdGuard Home replica (DNS, live; IPv6 fd80:c04a:5687:48::31) |
192.168.48.32 |
alloy-talos-logs (monitoring: Talos service and kernel log receiver, UDP 5180-5184) |
192.168.48.51 |
Coder workspace SSH service (devops); .52–.55 free since 2026-10-21 |
192.168.48.60 |
Reserved: Home Assistant (macvlan net1) |
192.168.48.61 |
Matter server (macvlan net1, live) |
192.168.48.62 |
Music Assistant (macvlan net1, live) |
192.168.48.63 |
ESPHome dashboard (macvlan net1) |
192.168.48.69 |
Reserved for temporary test pods that verify a macvlan attachment |
192.168.48.254 |
UCG-Max, VLAN 48 gateway |
192.168.50.8 |
QNAP NAS (also the UPS NUT server, see below) |
192.168.50.9 |
Free. Was the RPi (HAOS), decommissioned and retired after the 2026-10-17 retention window. Home Assistant, AdGuard Home, MQTT, Zigbee2MQTT, Matter and Music Assistant all moved to the cluster (2026-10-02 to 2026-10-04) |
192.168.50.239 |
SLZB-MR4U (Zigbee coordinator socket :7638 and Thread border router) |
Check before assigning an address¶
# every LoadBalancer IP in use (shared IPs list several services)
kubectl get svc -A --no-headers \
-o custom-columns=IP:.status.loadBalancer.ingress[0].ip,NS:.metadata.namespace,NAME:.metadata.name \
| awk '$1 ~ /^192\.168\.48\./' | sort -V
# every macvlan (Multus) pod address in use
kubectl get pods -A -o json | jq -r '.items[] | select(.metadata.annotations["k8s.v1.cni.cncf.io/networks"]) |
"\(.metadata.annotations["k8s.v1.cni.cncf.io/networks"]) \(.metadata.namespace)/\(.metadata.name)"'
# the pools themselves
kubectl get ciliumloadbalancerippool -o custom-columns=NAME:.metadata.name,BLOCKS:.spec.blocks,SELECTOR:.spec.serviceSelector
Also grep the repo (grep -rn "192.168.48.XX" cluster provision docs) for static references, and ping the address from a VLAN 48 host. Anything not in the table above and not seen in these checks (a device with a static IP or a DHCP reservation in UniFi) can still clash: check UniFi's client list for the VLAN.
Cilium observability¶
Cilium (cluster/apps/core/cilium/values.yaml) exports metrics from the agent (:9962, a host port on every node),
the operator (:9963), cilium-envoy, Hubble (:9965, host port) and Hubble relay, each with a ServiceMonitor in
kube-system. Hubble metrics carry namespace labels only, never pod names, to keep the series count low; add a
pod-level context only for a specific investigation. The chart ships the Cilium, operator and Hubble Grafana
dashboards as ConfigMaps labelled grafana_dashboard: "1", which the Grafana sidecar picks up from any namespace.
The cilium-envoy ServiceMonitor keeps only envoy_server_* and envoy_cilium_* (process health and Cilium's filter
stats, about 280 series in all); Envoy's per-listener and per-cluster histograms (about 7.9k series) are dropped,
because no dashboard or rule uses them and no policy sends traffic through the proxy. Widen the metricRelabelings
keep rule if L7 rules come back and their Envoy stats are needed.
Hubble relay (Deployment hubble-relay, kept off nv1) serves flows for the whole cluster. Hubble UI (deployed by
the cilium app, kept off nv1) is at hubble.<domain> on envoy-internal only, so from the home network. Hubble UI has
no login of its own; cluster/apps/system/hubble-ui puts an Envoy Gateway SecurityPolicy in front of it:
- Keycloak sign-in (realm
home, clienthubble-ui; client secret from Bitwarden through the ExternalSecrethubble-ui-oidc); - the OIDC filter forwards the access token, a JWT provider validates it against the realm's keys, and authorization
denies every request whose
resource_access.hubble-ui.rolesclaim lackshubble-admins. To give a person access, assign them the client rolehubble-adminsof the clienthubble-ui(Keycloak puts client roles in the access token by default). Keycloak's Clients,hubble-ui, Client scopes, Evaluate shows a user's token claims.
Without the UI (or when Keycloak is down), the owner reads flows with the CLI, in the elevated session:
cilium hubble port-forward &
hubble observe --verdict DROPPED --last 100
hubble observe -n <namespace> --protocol dns --last 100
Hubble TLS. Hubble's gRPC (agents to relay, and later the UI) uses certificates from cert-manager. The cilium app
(cluster/apps/core/cilium/templates/hubble-ca.yaml) holds a namespaced self-signed Issuer, a 10-year CA
Certificate hubble-ca and the Issuer hubble-ca-issuer; the chart (hubble.tls.auto.method: certmanager)
requests the 1-year leaves hubble-server-certs and hubble-relay-client-certs from it, and cert-manager renews them
after two thirds of their life. The CA keeps its private key across renewals (rotationPolicy: Never), so certificates
signed before a CA renewal stay trusted. Agents and relay reload renewed certificates without a restart. Expiry and
not-Ready certificates alert (prometheusrule-certificates.yaml). At bootstrap, before cert-manager exists, the
chart's certgen CronJob issues the certificates instead (docs/src/k8s/bootstrap.md).
Until 2026-12 the CronJob was used all the time. Its CA (kube-system/cilium-ca, 3 years) is never renewed, and
certgen refuses a leaf that would outlive it, so from one year before the CA expired every renewal failed; that
happened on 2026-11-30 and the CA was replaced by hand (.plans/cilium-observability-egress/evidence.md).
L7 proxy. cilium-envoy runs on every node but handles traffic only for policy rules with http rules (no
Cilium Ingress, Gateway API or CiliumEnvoyConfig; DNS and toFQDNs rules run in the agent). The values set
envoy.httpRetryCount: 0: by default the proxy resends a request up to 3 times on a 5xx, which repeats
non-idempotent requests (it was set for a LiteLLM rule that would have resent paid model calls). A failed connection
to the pod then reaches the client as a 503; clients retry themselves. No policy uses http rules today. Before
adding one, note that for ingress rules the proxy connects to the pod from the node's router address and adds no
X-Forwarded-For, so the pod no longer sees client addresses (Cilium uses the original source address only for
egress). The agent reads the setting at start, and the chart does not restart agents on a
ConfigMap change (rollOutCiliumPods: false), so a change to any proxy setting needs the agents restarted by hand
(kubectl -n kube-system rollout restart ds/cilium, with consent). Other proxy defaults: a request fails after 1 hour
and a stream with no traffic for 5 minutes is cut (envoy.streamIdleTimeoutDurationSeconds).
MQTT and Zigbee2MQTT¶
The MQTT broker is Eclipse Mosquitto (home-automation/mosquitto, namespace ha-mosquitto). It is exposed on 192.168.48.26:1883 (mqtt.PRIVATE_DOMAIN) for LAN clients; in-cluster clients use mosquitto.ha-mosquitto.svc.cluster.local:1883. Users (Home Assistant, Zigbee2MQTT) come from Bitwarden and the password file is generated at pod start; messages are persisted on a PVC. It replaced RabbitMQ's MQTT plugin because RabbitMQ never sends retained messages to wildcard subscriptions, so Home Assistant lost all MQTT-discovered entities (Zigbee2MQTT devices) after every restart.
Zigbee2MQTT (home-automation/zigbee2mqtt, namespace ha-zigbee2mqtt) talks to the SLZB-MR4U Zigbee coordinator over TCP (tcp://192.168.50.239:7638, zstack adapter). Its data (configuration.yaml, database.db, coordinator backup) lives on a Ceph PVC; the Zigbee network key is part of that data and is never committed. The frontend is at z2m.PRIVATE_DOMAIN on envoy-internal. Only one Zigbee2MQTT may own the coordinator: the RPi's old addon is gone with the RPi.
Pods with their own VLAN 48 address (Multus macvlan)¶
Some workloads need real LAN presence (mDNS, IPv6 to the Thread network, unrestricted ports to players), which a pod on the Cilium network cannot give them. They get a second interface, net1, a macvlan on the node's eth0 on VLAN 48 with a static IP from the reserved block (192.168.48.60–.69). The cluster-side parts live in cluster/apps/core/cilium (cni.exclusive: false) and cluster/apps/system/multus (Multus thick plus a small DaemonSet that installs the macvlan and static CNI plugins, which Talos does not ship). The NetworkAttachmentDefinition is named vlan48 and is defined in each consuming app's namespace; such pods are pinned to the control-plane nodes (mc1–mc3, parent interface eth0).
What the setup relies on (all verified from a test pod on net1 on 2026-10-02):
- IPv6 on VLAN 48: UniFi Router Advertisements/SLAAC are enabled on the network, so
net1gets afd80:c04a:5687:48::/64address and a default route via the gateway. The Talos nodes also pick up addresses in that prefix; Kubernetes still reports only their IPv4 addresses as node IPs. - Thread network: the UniFi static route to the OMR prefix (see
matter-thread.md) works from VLAN 48; a traceroute fromnet1goes gateway, then the SLZB border router. - mDNS: the UniFi mDNS reflector must forward the relevant services to VLAN 48 (Google Cast, Matter, Thread TREL and Spotify Connect were seen arriving; AirPlay and MeshCoP were not).
- macvlan host isolation: a pod's
net1cannot talk to its own node's addresses, including a LoadBalancer IP that node announces. In-cluster consumers must use*.svc.cluster.localnames, never LB IPs.
ESPHome¶
The ESPHome dashboard (home-automation/esphome, namespace ha-esphome) builds and flashes firmware for ESP devices. It replaces the Home Assistant OS add-on the RPi used. It runs on a Multus macvlan net1 at 192.168.48.63 (see the macvlan section above) and is at esphome.PRIVATE_DOMAIN on envoy-internal (Service port 6052). The YAML configs are on a Ceph PVC (/config, backed up by VolSync); the PlatformIO toolchain cache (/cache, 10 Gi) is rebuildable and not backed up. The dashboard has no login of its own: it is reachable only on the LAN, but port 6052 is also open on 192.168.48.63, so do not publish it on envoy-external.
The devices live on the IoT network (VLAN 40), the dashboard and Home Assistant on VLAN 48:
- mDNS: enable the UniFi mDNS repeater between VLAN 40 and VLAN 48 so the dashboard and Home Assistant discover devices (
_esphomelib._tcp) and resolve<name>.local. Devices on the IoT network need to reach the repeater, nothing else. - Firewall (VLAN 48 to VLAN 40): allow TCP 6053 (native API, Home Assistant and dashboard logs) and TCP 3232 (OTA from the dashboard). Do not allow VLAN 40 to open connections to VLAN 48, except for MQTT (
192.168.48.26:1883) if a device uses it. Devices still need DNS (AdGuard) and NTP. - Home Assistant: it already routes
192.168.0.0/16through the gateway on its ownnet1, so the ESPHome integration discovers devices over the mDNS repeater; add one by IP if it does not appear. - First flash: over USB from a computer (web.esphome.io or the
esphomeCLI) using the.binthe dashboard builds; later updates are OTA. Keep the API encryption key and OTA password in the dashboard'ssecrets.yamlon the PVC, never in git.
Music Assistant¶
Music Assistant (home-automation/music-assistant, namespace ha-music-assistant) runs on a Multus macvlan net1 at 192.168.48.62 (see the macvlan section above): upstream documents host networking as mandatory because players are discovered through mDNS/UPnP and stream from random ports, so a plain pod network is not enough. The web UI is ma.PRIVATE_DOMAIN on envoy-internal (Service port 8095); the stream server is on 192.168.48.62:8097.
- Library: the QNAP export
/musicis mounted by Kubernetes (NFS volume, read-only) at/media/musicand added in the UI as a Local filesystem provider. The RPi used MA's own in-container NFS provider, which needsSYS_ADMIN; that was deliberately not carried over. - Settings that matter behind the gateway: set the web server's Base URL (
base_url) to the publichttps://ma.PRIVATE_DOMAIN(the default,auto, resolves to the pod address and breaks the Home Assistant OAuth callback);external_urlcan match. Never change the web serverbind_port: the Service and route target 8095, and MA stops answering. Set the stream server'sbind_ipto192.168.48.62; otherwise MA hands players its pod address. - Login: the restored admin was linked only to Home Assistant OAuth, so it was removed and the first admin was created on the server's
/setuppage (username/password). The Home Assistant integration's system user and token were kept. - Home Assistant provider: needs the HA URL and a long-lived token (kept in the UI, not in git). Repoint it when Home Assistant itself moves into the cluster.
- Players: Chromecast/Shield (Google Cast) and the MacBook (AirPlay) work over the mDNS reflector. DLNA/SSDP discovery does not cross VLANs; no DLNA player is configured.
_[VIP]: Virtual IP (Used for high-availability controlplanes)
_[HA]: High Availability (often reduntant hardware/software)
_[PVC]: k8s resource - Persistent Volume Claim
_[PV]: k8s resource - Persistent Volume
_[CNI]: k8s networking - Container Network Interface
_[k8s]: Shortening of Kurbenetes
_[CRD]: Custom Resource Definitions
_[S3]: Simple Storage Service
_[NFS]: Network File System
_[DR]: Disaster Recovery