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
HighAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every worker node, open the kubelet config file and set
readOnlyPortto 0 (create the key if missing): -
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: -
Reload systemd and restart kubelet on every worker node (this will briefly disrupt workloads on that node):
-
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-portflag, and - If present, it appears only as
--read-only-port=0.
- Either there is no
Using kubectl
Using kubectl
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.Automation
Automation

