Skip to main content

More Info:

The kubelet streamingConnectionIdleTimeout should not be 0, which disables the timeout and leaves idle streaming connections open indefinitely.

Risk Level

High

Address

Security

Compliance Standards

  • CIS AKS

Triage and Remediation

Remediation

Manual Steps

  1. Check current kubelet config (per worker node)
    Run on every worker node:
    Note whether --config is used (config file) and whether --streaming-connection-idle-timeout=0 appears as a flag.
  2. If using kubelet config file, set a non‑zero timeout
    Run on every worker node (only if /var/lib/kubelet/config.yaml is in use):
    If the key does not exist, append it:
  3. If using command‑line flags, set a non‑zero timeout
    Run on every worker node (only if kubelet is configured via systemd flags):
    Edit the drop‑in unit:
    In the KUBELET_SYSTEM_PODS_ARGS (or corresponding) environment variable, ensure this flag is present and not 0, for example:
    Save and exit.
  4. Reload systemd and restart kubelet
    Run on every worker node:
  5. Verify kubelet restarted cleanly
    Run on every worker node:
  6. Verify non‑zero streaming idle timeout is in effect
    Run on every worker node:
    Confirm that --streaming-connection-idle-timeout is either absent (and handled via config file) or present with a value other than 0, and if using /var/lib/kubelet/config.yaml, confirm:
    shows a non‑zero value (for example 5m).
kubectl cannot modify kubelet process flags or its config file, so this finding cannot be fixed via the Kubernetes API. The streamingConnectionIdleTimeout setting must be changed directly on each worker node’s host configuration (for example /var/lib/kubelet/config.yaml or the kubelet systemd unit); see the Manual Steps section for how to do that.