Profile applicability: Level 1 - Worker Node
Ensure that the
kubelet service file ownership is set to root:root.The
kubelet service file controls various parameters that set the behavior of the kubelet service in the worker node. You should set its file ownership to maintain the integrity
of the file. The file should be owned by root:root.
NoteBy default,
kubelet service file ownership is set to root:root. |
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 %U:%G /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
Verify that the ownership is set to
root:root.Remediation
Run the below command (based on the file location on your system) on the each worker
node:
chown root:root /etc/systemd/system/kubelet.service.d/kubeadm.conf
