Skip to main content

More Info:

A streaming connection idle timeout of 0 disables timeouts, leaving idle connections open and exposed to denial of service. Setting a non-zero value ensures idle streaming connections are closed.

Risk Level

High

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every worker node, back up the existing kubelet config file:
  2. On every worker node, edit /var/lib/kubelet/config.yaml and set a non‑zero timeout (example: 5 minutes). If the key exists and is 0, change it; if it does not exist, add it under the top‑level config:
    If the line does not already exist, open the file with an editor and add, at top level (aligned with other keys like authentication / authorization):
  3. If your kubelet also uses command-line flags via systemd drop‑in, ensure it does not override this to 0. On every worker node, open the systemd drop‑in file:
    If you see --streaming-connection-idle-timeout=0 anywhere, edit the file with a text editor and change it to:
  4. On every worker node, reload systemd and restart kubelet (this will temporarily disrupt kubelet on that node):
  5. On every worker node, verify kubelet is running and the timeout is no longer 0:
    Confirm that either the kubelet command line does not contain --streaming-connection-idle-timeout=0 (and if present, shows a non‑zero value like 5m), and that /var/lib/kubelet/config.yaml contains streamingConnectionIdleTimeout: 5m (or another non‑zero duration).
kubectl cannot modify kubelet process flags or its config file at /var/lib/kubelet/config.yaml, so this setting cannot be fixed via the Kubernetes API. Apply the remediation directly on every worker node’s host configuration as described in the Manual Steps section.