2.1.13 Ensure that the --cadvisor-port argument is set to 0

Information

Disable cAdvisor.

Rationale:

cAdvisor provides potentially sensitive data and there's currently no way to block access to it using anything other than iptables. It does not require authentication/authorization to connect to the cAdvisor port. Hence, you should disable the port.

Solution

Edit the kubelet service file '/etc/systemd/system/kubelet.service.d/10-kubeadm.conf' on each worker node and set the below parameter in 'KUBELET_CADVISOR_ARGS' variable.

--cadvisor-port=0

Based on your system, restart the 'kubelet' service. For example:

systemctl daemon-reload
systemctl restart kubelet.service

Impact:

cAdvisor will not be available directly. You need to work with `/metrics` endpoint on the API server.

See Also

https://workbench.cisecurity.org/files/1788

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6b., CSCv6|9.1

Plugin: Unix

Control ID: 7c02fd67074e0dbd090a51cc64870afe812187c39ddf4879208d7e1ea250e090