More Info:
The kubelet kubeconfig file should be owned by root:root. Improper ownership could let non-root users tamper with the kubelets cluster credentials.Risk Level
MediumAddress
SecurityCompliance Standards
- CIS OKE
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every worker node, confirm the kubelet kubeconfig path (from the finding it is
/var/lib/kubelet/kubeconfig): -
On every worker node, change the ownership of the kubelet kubeconfig file to
root:root: -
(Optional but recommended) Confirm file permissions are appropriately restrictive (e.g.
600): -
On every worker node, verify the ownership is now
root:root:
Using kubectl
Using kubectl
This setting is a host-level file ownership issue on each worker node and cannot be changed via kubectl or any Kubernetes API object. To fix it, adjust the file ownership directly on the nodes’ filesystem (for
/var/lib/kubelet/kubeconfig on every worker node) and follow the guidance in the Manual Steps section.Automation
Automation

