Skip to main content

More Info:

A streaming connection idle timeout of 0 disables the timeout, leaving idle exec/attach/port-forward connections open indefinitely and exposing the node to resource exhaustion. Set a non-zero value.

Risk Level

High

Address

Security

Compliance Standards

  • CIS EKS

Triage and Remediation

Remediation

Manual Steps

  1. On every worker node, check how kubelet is configured and whether the flag is present:
  2. If kubelet uses a config file (preferred) and /var/lib/kubelet/config.yaml exists, edit it and set a non-zero timeout (creates the key if missing):
  3. Ensure no conflicting --streaming-connection-idle-timeout flag exists in systemd drop-ins so the config file value is not overridden:
    Manually open the file if it exists and confirm any residual double spaces or stray backslashes are cleaned up:
  4. If instead your kubelet is configured only with executable arguments (no config file), append a non-zero timeout flag to the kubelet args on each worker node:
    Adjust the KUBELET_ARGS line manually if your distribution uses a different variable name or format.
  5. Restart kubelet on every worker node so the new settings take effect (this will restart the kubelet and may briefly impact pod scheduling on that node):
  6. Verify on every worker node that kubelet is running with a non-zero idle timeout (or no =0 setting present):
    Optionally, if the config file is used, confirm the effective value:
kubectl cannot modify kubelet process flags or the host-level configuration files involved in this finding. To remediate, you must change the kubelet settings directly on every worker node (for example /etc/kubernetes/kubelet/kubelet-config.json, /etc/systemd/system/kubelet.service.d/10-kubelet-args.conf, or via the configz-based method) as described in the Manual Steps section.