Skip to main content

More Info:

Encrypt etcd key-value store.

Risk Level

Low

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. Create the EncryptionConfig file (on every control plane node)
  2. Generate a strong AES key and insert it into the config (on every control plane node)
  3. Edit the kube-apiserver static pod manifest to add the flag (on every control plane node)
    Open the manifest in an editor:
    Under spec.containers[0].command, add this line as its own list item (or update it if present):
    Save and exit. Editing this file will automatically restart the kube-apiserver container.
  4. (If needed) Mount the directory into the kube-apiserver pod (on every control plane node)
    In the same /etc/kubernetes/manifests/kube-apiserver.yaml, ensure you have:
    Under spec.volumes:
    Under spec.containers[0].volumeMounts:
    Save the file; kubelet will restart the kube-apiserver again if modified.
  5. Optionally re-encrypt existing stored data (on any machine with kubectl access)
    This requires a deliberate operational decision (downtime risk, backup/restore planning). To prepare and review impact:
    Plan a maintenance window and follow the official documentation (kube-apiserver --encryption-provider-config-automatic-reload / kube-apiserver re-encryption procedures) before forcing re-encryption of existing resources.
  6. Verify the kube-apiserver is running with the encryption-provider-config flag (on every control plane node)
    The command should return the kube-apiserver process line containing the --encryption-provider-config argument with the expected path.
kubectl cannot modify the kube-apiserver static pod manifest or its --encryption-provider-config flag; this setting is controlled directly on each control plane node in /etc/kubernetes/manifests/kube-apiserver.yaml. To remediate this finding, follow the guidance in the Manual Steps section on those nodes.

Additional Reading: