More Info:
Encrypt etcd key-value store.Risk Level
LowAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Create the EncryptionConfig file (on every control plane node)
-
Generate a strong AES key and insert it into the config (on every control plane node)
-
Edit the kube-apiserver static pod manifest to add the flag (on every control plane node)
Open the manifest in an editor:Underspec.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. -
(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:
Underspec.volumes:Underspec.containers[0].volumeMounts:Save the file; kubelet will restart the kube-apiserver again if modified. -
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-apiserverre-encryption procedures) before forcing re-encryption of existing resources. -
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-configargument with the expected path.
Using kubectl
Using kubectl
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.Automation
Automation

