The AI that fixes outages by itself — Patent pending
Talk to us ↗
Free now Early adopters: become a Design Partner — Limited places available 

Kubernetes · Incidents

DNS is not down: finding the missing kube-proxy in a half-cluster

A nodeSelector added to the kube-proxy DaemonSet during an upgrade removed the proxy from most nodes. Services still existed; traffic stopped. Here is how to tell a proxy gap from a DNS failure in two minutes, and the fleet check that would have caught it first.

Your Service still has its ClusterIP. Pods are running, and on the nodes that still have a proxy, everything resolves. Then, from the nodes that lost it, every svc.namespace.svc name stops answering — and the first thing an operator assumes is DNS, because the names that fail look exactly like DNS. In one cluster that assumption cost the difference between a twenty-minute rollback and a multi-hour investigation.

Here is how a two-line configuration change removed kube-proxy from most of a cluster, why the failure reads as DNS, and the three checks that separate a proxy gap from a resolver failure in about two minutes.

What the outage actually was

An engineer added a nodeSelector to the kube-proxy DaemonSet during a cluster upgrade. The DaemonSet controller did what a DaemonSet does: it created a pod only where the selector matched, and the pods on every other node stopped being wanted. Within a reconcile or two, most nodes had no kube-proxy at all.

Nothing on those nodes looked dead. The pods stayed Running, the control plane stayed healthy, and the Service objects still existed with their ClusterIPs. What stopped working was the rule that turns a ClusterIP into an address the node can route: without the proxy, the iptables or IPVS entries that forward Service traffic are gone, and they do not rebuild themselves. Traffic addressed to a Service IP on those nodes has nowhere to go. The cluster DNS service IP fails for the same reason — which is exactly why the symptom reads as DNS.

The tell is geography. A real DNS failure is usually uniform: every node fails the same names. A proxy gap is selective — the same Service works from half the cluster and fails from the other half, and the dividing line lines up with a recent change to the proxy or its node selection.

Why a DNS check misses it

CoreDNS pods are healthy, and a resolve test run from a node that still has kube-proxy returns answers, because that node can still reach the DNS service IP. The failure is not in the resolver; it is in the last hop between the node and the service IP, and only the nodes without a proxy are missing that hop. Confirm the DNS service first, then the proxy fleet, then test from both sides of the divide:

Is it DNS, or is it the proxy fleet
# 1. DNS service and pods — if these are Ready, DNS is probably not your problem
kubectl get pods -n kube-system -l k8s-app=kube-dns -o wide
kubectl get endpoints kube-dns -n kube-system

# 2. The proxy fleet — the number you actually want to watch
kubectl get ds kube-proxy -n kube-system -o wide
kubectl get pods -n kube-system -l k8s-app=kube-proxy -o wide

# 3. The same name, from both sides of the divide
kubectl debug node/<node-with-proxy>    --image=busybox -- nslookup kube-dns.kube-system.svc
kubectl debug node/<node-without-proxy> --image=busybox -- nslookup kube-dns.kube-system.svc

If DESIRED and READY on the DaemonSet disagree, you have your answer before you touch DNS. If they agree and some nodes still fail, the gap is somewhere else in the node network.

How to confirm the gap

Two numbers that should be equal, and usually are not:

One check per node
kubectl get ds kube-proxy -n kube-system          # DESIRED and READY should match
kubectl get pods -n kube-system -l k8s-app=kube-proxy -o wide

# the config that caused it
kubectl get ds kube-proxy -n kube-system -o yaml | sed -n '/nodeSelector/,/podTemplate/p'

In the incident above the nodeSelector matched one node label; the rest of the cluster stopped being selected. On EKS the proxy is managed for you, which makes this slip less likely — but any cluster where the proxy manifests live in Git and get edited by hand has the same failure available.

What to change

  • Remove the nodeSelector, or fix it to match every node that should run the proxy, and let the controller recreate the missing pods. On GitOps-managed clusters that is a commit, not a kubectl edit — editing the live object gets overwritten on the next sync, and the incident comes back.
  • Watch DESIRED == READY before closing anything out. The controller recreates pods on its schedule, so the count settles a minute or two after the change.
  • Re-run the resolve test from a node that was failing. The entries rebuild as each proxy pod comes up, so the last node to heal is the one to test.
  • If the selector was added on purpose — pinning the proxy to a subset of nodes — say so in a manifest comment. A nodeSelector on kube-proxy is a statement that some nodes are not part of the Service plane; most clusters do not mean that.

Why it hides

Three things conspire to make this look like DNS. The failures are name-based, so the vocabulary you reach for is DNS vocabulary. The pods on the affected nodes keep Running, so nothing in the pod world is red. And the most obvious health check — “is CoreDNS up?” — passes, because CoreDNS is up; what is down is the forwarding rule the name resolves into. The check that would have caught it in the first minute is not a resolve test. It is a fleet count: a DaemonSet whose ready count fell below its desired count is a node-level capability leaving the cluster.

How the kube-proxy gap happens and is caught: nodeSelector added to the DaemonSet, pods stop being wanted on unselected nodes, Service routing rules vanish on those nodes, the fleet count flags ready below desired, the manifest is fixed and the pods rebuild.
The whole incident in one strip: the selector goes in, the fleet count falls, the gap is flagged by name, the manifest is fixed, and the count comes back.

Srenix runs exactly this check: it flags system DaemonSets — kube-proxy included — whenever the ready count falls below the desired count, and names the object when it does. It reports the gap with a hint; it does not change the manifest, and it has no opinion about whether your selector was a mistake. Fixing that still takes the commit.

On-call should be quieter every week.

One Helm install. No telemetry leaves your cluster. No per-investigation surprises.