node-doctor

by mattmattox503

Helm chartv1.10.0App v1.10.0

A Kubernetes DaemonSet that monitors node health, detects issues, and optionally remediates problems across your cluster

About this chart

Node Doctor Helm Chart

A Kubernetes DaemonSet that monitors node health, detects issues, and optionally remediates problems across your cluster.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.0+
  • PodSecurityPolicy (if enabled) must allow privileged containers

Installation

Add the Helm Repository

helm repo add supporttools https://charts.support.tools
helm repo update

Install the Chart

helm install node-doctor supporttools/node-doctor \
  --namespace node-doctor \
  --create-namespace

Install with Custom Values

helm install node-doctor supporttools/node-doctor \
  --namespace node-doctor \
  --create-namespace \
  -f custom-values.yaml

Configuration

The following table lists the configurable parameters of the Node Doctor chart and their default values.

General Settings

ParameterDescriptionDefault
settings.logLevelLog level (debug, info, warn, error)info
settings.logFormatLog format (json, text)json
settings.updateIntervalMonitor update interval30s
settings.resyncIntervalResync interval5m
settings.heartbeatIntervalHeartbeat interval1m
settings.dryRunModeDry run mode (log without executing)false

Image Settings

ParameterDescriptionDefault
image.repositoryImage repositoryharbor.support.tools/node-doctor/node-doctor
image.pullPolicyImage pull policyIfNotPresent
image.tagImage tagChart appVersion

Resources

ParameterDescriptionDefault
resources.requests.cpuCPU request50m
resources.requests.memoryMemory request128Mi
resources.limits.cpuCPU limit500m
resources.limits.memoryMemory limit256Mi

Do not lower resources.limits.cpu back toward 200m. At a 200m limit the agent ran 30-71% CFS-throttled across a 13-node fleet (median 44.2%). The agent is the process that performs the network/DNS probing, so its own scheduling delay is added to every RTT it measures, which inflates reported latency and can produce false NetworkDegraded / HighPeerLatency findings. Requests stay low (50m) because sustained usage is well under the limit - what the agent needs is burst headroom, not reserved capacity on every node.

Update Strategy

ParameterDescriptionDefault
updateStrategy.typeDaemonSet update strategyRollingUpdate
updateStrategy.rollingUpdate.maxUnavailablePods that may be unavailable during a roll25%

maxUnavailable is deliberately a percentage rather than 1. With maxUnavailable: 1 a single already-crashlooping pod consumes the whole unavailable budget and the rollout never progresses (see DaemonSet rollout is stuck).

Do not set maxSurge. The agent runs with hostNetwork: true and a hostPort, so a surge pod would conflict with the pod it is replacing on the same node and never become ready.

Monitor Configuration

ParameterDescriptionDefault
monitors.cpu.enabledEnable CPU monitortrue
monitors.memory.enabledEnable memory monitortrue
monitors.disk.enabledEnable disk monitortrue

Exporter Configuration

ParameterDescriptionDefault
exporters.kubernetes.enabledEnable Kubernetes exportertrue
exporters.prometheus.enabledEnable Prometheus exportertrue
exporters.prometheus.portPrometheus metrics port9101

ServiceMonitor (Prometheus Operator)

ParameterDescriptionDefault
serviceMonitor.enabledCreate ServiceMonitorfalse
serviceMonitor.intervalScrape interval30s
serviceMonitor.scrapeTimeoutScrape timeout10s

IPv6 / Dual-Stack

Node Doctor ships four detection-only IPv6 monitors (they never modify host settings) and binds its HTTP/metrics endpoints dual-stack by default.

ParameterDescriptionDefault
monitors.ipv6Sysctl.enabledDetect disable_ipv6 sysctl set when IPv6 is expected ontrue
monitors.ipv6Route.enabledDetect a missing IPv6 default route when expectedtrue
monitors.ipv6Neighbor.enabledDetect missing RA/SLAAC address (link-local/global) and accept_ra disabledtrue
monitors.ipv6Firewall.enabledSanity-check ip6tables/nftables for an IPv6 black-hole (detection only)true
monitors.ipv6Sysctl.expectIPv6EnabledTreat IPv6-disabled as a problem (shared key across the IPv6 monitors)true
monitors.ipv6Firewall.backendFirewall backend to read: auto, ip6tables, or nftauto

These monitors degrade gracefully on IPv4-only nodes: a missing IPv6 stack is reported as a warning, not an error, and the conditions stay healthy when IPv6 cannot be confirmed. On purely IPv4 clusters you can silence them by setting expectIPv6Enabled: false (or enabled: false) on each:

monitors:
  ipv6Sysctl:
    enabled: false
  ipv6Route:
    enabled: false
  ipv6Neighbor:
    enabled: false
  ipv6Firewall:
    enabled: false

Network metrics (gateway_latency_seconds, peer_latency_seconds, peer_reachable, dns_latency_seconds) carry an address_family label (ipv4/ipv6/unknown) so dashboards and alerts can distinguish the families; the bundled PrometheusRule alerts (prometheusRule.enabled) include a NodeDoctorIPv6Misconfigured alert and per-family peer alerts.

Security Considerations

Node Doctor requires privileged access to monitor system health effectively. This includes:

  • Privileged Container: Required for accessing /proc, /sys, and other system interfaces
  • Host Network: Required for network monitoring and kubelet communication
  • Host PID: Required for process monitoring
  • Volume Mounts: Access to host filesystem for disk and log monitoring

Uninstalling

helm uninstall node-doctor -n node-doctor
kubectl delete namespace node-doctor

Upgrading

helm repo update
helm upgrade node-doctor supporttools/node-doctor -n node-doctor

Troubleshooting

Check DaemonSet Status

kubectl get daemonset node-doctor -n node-doctor

View Pod Logs

kubectl logs -n node-doctor -l app.kubernetes.io/name=node-doctor --tail=100

Check Node Conditions

kubectl get nodes -o custom-columns='NAME:.metadata.name,HEALTHY:.status.conditions[?(@.type=="NodeDoctorHealthy")].status'

DaemonSet rollout is stuck at 0/N

A DaemonSet rollout only replaces pods while fewer than updateStrategy.rollingUpdate.maxUnavailable pods are unavailable. Pods that were already unhealthy before the roll started (CrashLoopBackOff, ImagePullBackOff, Pending on a cordoned/full node) count against that budget. If enough of them are stuck, the controller has no budget left and kubectl rollout restart sits at 0/N updated indefinitely - nothing is wrong with the new revision, the roll simply never starts.

The chart ships maxUnavailable: 25% so a single stuck pod can no longer wedge the whole roll, but a large enough group of unhealthy pods can still exhaust the budget.

Confirm that is what is happening:

# Rollout makes no progress
kubectl rollout status daemonset/node-doctor -n node-doctor --timeout=60s

# Budget in effect and how many pods are actually unavailable
kubectl get daemonset node-doctor -n node-doctor \
  -o jsonpath='{.spec.updateStrategy.rollingUpdate.maxUnavailable}{"\n"}'
kubectl get daemonset node-doctor -n node-doctor \
  -o custom-columns='DESIRED:.status.desiredNumberScheduled,READY:.status.numberReady,UPDATED:.status.updatedNumberScheduled,UNAVAILABLE:.status.numberUnavailable'

# Which pods are holding the budget
kubectl get pods -n node-doctor -l app.kubernetes.io/name=node-doctor \
  --field-selector=status.phase!=Running -o wide
kubectl get pods -n node-doctor -l app.kubernetes.io/name=node-doctor \
  -o wide | grep -v ' Running '

Recovery. Fix or remove the blocking pods so the budget frees up. The stuck pod is the one to delete first - deleting it lets the DaemonSet recreate it at the new revision:

# 1. Delete the pods that are already unhealthy (they are recreated at the new revision)
kubectl delete pod -n node-doctor <stuck-pod-name>

# 2. If the roll still does not move, delete healthy pods a few at a time to force
#    replacement. Verify each batch comes back Ready before deleting the next.
kubectl delete pod -n node-doctor <healthy-pod-name>
kubectl rollout status daemonset/node-doctor -n node-doctor --timeout=120s

Deleting node-doctor pods is safe: it is a stateless per-node agent, and while a pod is gone that node simply reports no fresh findings. Do not delete every pod at once - staggering keeps node condition reporting continuous across the cluster.

If the blocking pod is stuck because its node is unreachable or NotReady, drain or delete the node object instead; the pod will not terminate on its own while the kubelet is unreachable.

View Prometheus Metrics

kubectl exec -n node-doctor -it $(kubectl get pods -n node-doctor -l app.kubernetes.io/name=node-doctor -o jsonpath='{.items[0].metadata.name}') -- wget -qO- http://localhost:9101/metrics | head -50

License

Apache 2.0 - See LICENSE for details.

Deploy node-doctor with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has node-doctor on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartnode-doctor is pinned at v1.10.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply