This is a real incident from my homelab, which runs a Talos Kubernetes cluster on Proxmox behind an OPNsense firewall. It also hosts live products, so “it’s just a homelab” did not make it any less of an outage. It took 3 to 4 hours to fully resolve.
What it looked like
Everything that needed the internet broke at once:
- Pods stuck in
ImagePullBackOfffor images onghcr.ioand my private registry cloudflaredcrash-looping withlookup _v2-origintunneld._tcp.argotunnel.com ... i/o timeout, so every public site was downexternal-dnscrash-looping- No alerts arriving in chat, because the alerting path needed the internet too
dig @<firewall> ghcr.ioreturningSERVFAIL, whiledig @1.1.1.1 ghcr.iofrom the same host worked fine
That last pair is the important clue. The host could reach the internet. The firewall could not.
The investigation
1. DNS on the firewall. OPNsense’s Unbound resolver was in full recursive mode with no upstream forwarders. Recursion fails when the box itself has no working uplink, so I added 1.1.1.1 and 1.0.0.1 as catch-all forwarders. Still SERVFAIL. DNS was a symptom, not the cause.
2. Test from the firewall itself. From the OPNsense shell:
drill ghcr.io @1.1.1.1 # error sending query: network error
ping 1.1.1.1 # 100% packet loss
ping <wrong-gw> # Destination Net Unreachable
ping <real-gw> # 0% packet loss
The firewall’s default route pointed at the wrong upstream router. The WAN interface used DHCP, and the DHCP server on that network was handing out a router option that was not the real internet gateway. OPNsense trusted it. The Proxmox host on the same network had a static route to the real gateway, which is why it worked and made the problem look like “Kubernetes DNS”.
Fix: set the gateway statically under System > Gateways, which overrides whatever DHCP says.
3. DNS fixed, TCP still dead. Image pulls now failed with dial tcp <ip>:443: i/o timeout. Names resolved, connections did not. A throwaway pod confirmed it:
kubectl run nettest -n kube-system --rm -i --image=busybox:1.36 --restart=Never \
-- sh -c "nc -zvw5 <registry-ip> 443"
# Connection timed out
4. The empty NAT table. Firewall > NAT > Outbound was set to “Automatic outbound NAT”, and the automatic rules table was completely empty. Nothing from the cluster subnet was being masqueraded. There was no error and no warning; it just did nothing.
Fix: switch to manual outbound NAT and add one rule, source = the whole LAN subnet, translated to the WAN interface address.
One trap here: the suggested default source was “LAN address”, which in OPNsense means the firewall’s own LAN IP only. You want “LAN net” (or the CIDR). With “LAN address” the rule looks right and still NATs nothing for your nodes.
Root cause chain
DHCP hands out the wrong router
└─ firewall default route is wrong, firewall has no internet
└─ Unbound recursion fails, SERVFAIL
└─ CoreDNS upstream fails, cluster DNS broken
└─ image pulls fail, cloudflared down, external-dns down
Separately: automatic outbound NAT generated zero rules
└─ even with routing fixed, cluster egress was not masqueraded
Two independent faults, and the first one hid the second. Fixing DNS made things look better while leaving everything just as broken.
What I changed
- Static WAN gateway on the firewall instead of trusting DHCP
- Explicit DNS forwarders in Unbound
- Manual outbound NAT rule covering the full LAN subnet
- Restarted the pods that had given up
Then verified from the outside in: DNS from the hypervisor, TCP egress from a pod, tunnel SRV records resolving, and every affected pod Running.
Lessons
- DNS failures cascade with misleading errors. Kubernetes reported “server misbehaving” on image pulls, not “your firewall has no route to the internet”.
- Test from the firewall first. One
drillfrom the OPNsense shell would have skipped an hour of looking at CoreDNS. - “Automatic” can silently mean “nothing”. After saving any auto-generated firewall config, check that the generated table actually has entries.
- “LAN address” is not “LAN net”. Same screen, very different blast radius.
- Your alerting needs a path that doesn’t share the failure. Mine went quiet exactly when I needed it.
Triage checklist I now keep
dig @<firewall> ghcr.io +time=3 # 1. does the firewall resolve?
ping -c3 1.1.1.1; drill ghcr.io @1.1.1.1 # 2. from the firewall shell: is there egress?
netstat -rn | head -5 # 3. is the default route the real gateway?
kubectl run nettest -n kube-system --rm -i --image=busybox:1.36 --restart=Never \
-- sh -c "nc -zvw5 1.1.1.1 53; nc -zvw5 <registry-ip> 443" # 4. pod egress
# 5. Firewall > NAT > Outbound: is the rules table non-empty?
The full cluster setup, including the original incident notes, is public in talos-proxmox-gitops.
I do Kubernetes reliability audits and fractional SRE work. If your cluster has its own version of this waiting to happen, see how I work.