CNTR-K8-000330 - The Kubernetes Kubelet must have the 'readOnlyPort' flag disabled - readOnlyPort flag disabled.

Warning! Audit Deprecated

This audit has been deprecated and will be removed in a future update.

View Next Audit Version

Information

Kubelet serves a small REST API with read access to port 10255. The read-only port for Kubernetes provides no authentication or authorization security control. Providing unrestricted access on port 10255 exposes Kubernetes pods and containers to malicious attacks or compromise. Port 10255 is deprecated and should be disabled.

Solution

On each Control Plane and Worker Node, run the command:
ps -ef | grep kubelet

Remove the '--read-only-port' option if present.

Note the path to the config file (identified by --config).

Edit the config file:
Set 'readOnlyPort' to '0' or remove the setting.

Restart the kubelet service using the following command:
systemctl daemon-reload && systemctl restart kubelet

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_Kubernetes_V2R1_STIG.zip

Item Details

References: CAT|I, CCI|CCI-000213, Rule-ID|SV-242387r960792_rule, STIG-ID|CNTR-K8-000330, Vuln-ID|V-242387

Plugin: Unix

Control ID: d70f3cd4364e7c4043db79f50646e0a064c7d4970f0947d42670460de76f99dd