More Info:
Verifies that the etcd data directory is owned by etcd:etcd so only the etcd service account can access the cluster datastore.Risk Level
MediumAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every control plane node, identify the etcd data directory:
From the output, note the value passed to
--data-dir. If no--data-diris present, use/var/lib/etcd/default.etcdas the directory. -
On every control plane node, confirm the directory exists (replace the path if different):
If your
--data-dirwas different, substitute that exact path in place of/var/lib/etcd. -
On every control plane node, ensure the
etcduser and group exist:If this command fails, create them according to your OS standards before proceeding. -
On every control plane node, change ownership of the etcd data directory (substitute the actual data-dir path if different):
-
On every control plane node, verify the ownership is now correct for the etcd data directory (replace the path with your actual data-dir if needed):
The output must be:
Using kubectl
Using kubectl
kubectl cannot modify host-level file ownership such as the etcd data directory on control plane nodes; this must be corrected directly on each control plane node’s filesystem (for example with
chown on /var/lib/etcd). See the Manual Steps section for the exact commands to run on the nodes.Automation
Automation

