3.2.4 Ensure that the --read-only-port is disabled

Information

Disable the read-only port.

The Kubelet process provides a read-only API in addition to the main Kubelet API. Unauthenticated access is provided to this read-only API which could possibly retrieve potentially sensitive information about the cluster.

Solution

If modifying the Kubelet config file, edit the kubelet-config.json file /etc/kubernetes/kubelet/kubelet-config.json and set the below parameter to 0

"readOnlyPort": 0

If using executable arguments, edit the kubelet service file /etc/systemd/system/kubelet.service.d/10-kubelet-args.conf on each worker node and add the below parameter at the end of the KUBELET_ARGS variable string.

--read-only-port=0

For each remediation:Based on your system, restart the kubelet service and check status

systemctl daemon-reload
systemctl restart kubelet.service
systemctl status kubelet -l

Impact:

Removal of the read-only port will require that any service which made use of it will need to be re-configured to use the main Kubelet API.

See Also

https://workbench.cisecurity.org/benchmarks/16093

Item Details

Category: ACCESS CONTROL, SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|AC-18, 800-53|SC-23, CSCv7|9.2

Plugin: Unix

Control ID: fa31e0d6e777ddbf84893ec9216a91eeb94325282d93e6e7e412234bc25fe638