CIS-4.1.5 - Ensure that the --kubeconfig kubelet.conf file permissions are set to 600 or more restrictive

Ensure that the --kubeconfig kubelet.conf file permissions are set to 600 or more restrictive

Note: to enable this control run Kubescape with host sensor (see here)

Framework

CIS

Severity

Medium

Description of the the issue

The kubelet.conf file is the kubeconfig file for the node, and controls various parameters that set the behavior and identity of 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.

Related resources

What does this control test

Ensure that the kubelet.conf file has permissions of 600 or more restrictive.

How to check it manually

Run the below command (based on the file location on your system) on the each worker node. For example,

stat -c %a /etc/kubernetes/kubelet.conf

Verify that the ownership is set to root:root.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. For example,

chmod 600 /etc/kubernetes/kubelet.conf

Impact Statement

None

Default Value

By default, kubelet.conf file has permissions of 600.

Example

No example