Skip to main content

More Info:

Ensure that the etcd data directory ownership is set to etcd:etcd

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, determine the etcd data directory:
    From the output, note the value of --data-dir (for example /var/lib/etcd or /var/lib/etcd/default.etcd).
  2. On the same control plane node, confirm that directory exists (substitute the actual path you found):
    If the directory is different, replace /var/lib/etcd in the command above with your actual data directory path.
  3. On the same control plane node, change ownership of the etcd data directory to etcd:etcd (substitute the actual path you found):
  4. If your etcd data directory is not explicitly set via --data-dir and does not exist, create the default directory and set ownership:
  5. On the same control plane node, verify ownership using a command derived from the audit:
    Ensure the output is:
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.

Additional Reading: