Views:
Profile applicability: Level 1 - Master Node
Ensure that the kubelet service file has permissions of 600 or more restrictive.
The kubelet service file controls various parameters that set the behavior of the kubelet service in the worker node. You should restrict its file permissions to maintain the integrity of the file. The file should be writable by only the administrators on the system.
Note
Note
By default, the kubelet service file has permissions of 640.

Audit

Automated AAC auditing has been modified to allow CIS-CAT to input a variable for the <PATH>/<FILENAME> of the kubelet service config file. Set $kubelet_service_config=<PATH> based on the file location on your system:
export
kubelet_service_config=/etc/systemd/system/kubelet.service.d/kubeadm.conf
To perform the audit manually, run the below command (based on the file location on your system) on the each worker node:
stat -c %a /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
Verify that the permissions are 600 or more restrictive.

Remediation

Run the below command (based on the file location on your system) on the each worker node:
chmod 600 /etc/systemd/system/kubelet.service.d/kubeadm.conf