Skip to main content

More Info:

Do not disable timeouts on streaming connections.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every worker node, check whether kubelet uses a config file and/or flags:
    Review the command line for --config= and --streaming-connection-idle-timeout=.
  2. If /var/lib/kubelet/config.yaml is in use, edit it to ensure the timeout is non‑zero:
    If the key does not exist or is set differently, open the file and add or adjust it under the top-level config:
    and set:
  3. If kubelet uses command-line flags via systemd, edit the drop-in file on each worker node:
    In the Environment= line that defines kubelet args, either:
    • Replace any existing --streaming-connection-idle-timeout=0 with:
    • Or, if it is missing, append:
    to the list of arguments.
  4. Reload systemd and restart kubelet on each worker node so changes take effect:
  5. Verify kubelet is running with a non‑zero streaming idle timeout on each worker node:
    Confirm in the output that:
    • --streaming-connection-idle-timeout=5m is present (if using flags), and
    • There is no --streaming-connection-idle-timeout=0.
kubectl cannot modify kubelet process flags or its config file on worker nodes, so this finding cannot be fixed via the Kubernetes API. To remediate, edit /var/lib/kubelet/config.yaml or the kubelet systemd drop-in on each worker node as described in the Manual Steps section.

Additional Reading: