Skip to main content

More Info:

The kubelet read-only port serves cluster information without authentication or authorization. Setting —read-only-port to 0 disables this unauthenticated endpoint.

Risk Level

High

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every worker node, open the kubelet config file and set readOnlyPort to 0 (create the key if missing):
  2. Still on every worker node, ensure any kubelet systemd drop-in does not override this with a non‑zero flag. Inspect:
    If you see a line like --read-only-port=10255, edit the file to set it to 0, for example:
  3. Reload systemd and restart kubelet on every worker node (this will briefly disrupt workloads on that node):
  4. Verify on every worker node that kubelet is running with --read-only-port=0 (or not present at all, relying on the config file) using the audit command:
    Inspect the output and confirm:
    • Either there is no --read-only-port flag, and
    • If present, it appears only as --read-only-port=0.
kubectl cannot modify kubelet host-level configuration or process flags, so it cannot be used to set readOnlyPort to 0. This must be fixed directly on each worker node (for example in /var/lib/kubelet/config.yaml or the kubelet systemd drop-in), so follow the guidance in the Manual Steps section on those nodes.