More Info:
Ensure that the etcd data directory ownership is set to etcd:etcdRisk Level
MediumAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every control plane node, determine the etcd data directory:
From the output, note the value of
--data-dir(for example/var/lib/etcdor/var/lib/etcd/default.etcd). -
On the same control plane node, confirm that directory exists (substitute the actual path you found):
If the directory is different, replace
/var/lib/etcdin the command above with your actual data directory path. -
On the same control plane node, change ownership of the etcd data directory to
etcd:etcd(substitute the actual path you found): -
If your etcd data directory is not explicitly set via
--data-dirand does not exist, create the default directory and set ownership: -
On the same control plane node, verify ownership using a command derived from the audit:
Ensure the output is:
Using kubectl
Using kubectl
kubectl cannot modify ownership of the etcd data directory or edit
/etc/kubernetes/manifests/etcd.yaml, because these are host-level files managed directly on each control plane node. To remediate this finding, follow the instructions in the Manual Steps section on every control plane node.Automation
Automation

