More Info:
Verifies that —encryption-provider-config is set so secrets are encrypted at rest in etcd rather than stored in plaintext.Risk Level
HighAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
- On every control plane node, create a secure directory and EncryptionConfig file (adjust key value if you generate your own):
- On every control plane node, edit the API server static pod manifest to add the encryption-provider-config flag:
/etc/kubernetes/encryption/encryption-config.yaml.)- On every control plane node, ensure the EncryptionConfig file is mounted into the kube-apiserver pod by adding a volume and volumeMount if they are not present. Edit
/etc/kubernetes/manifests/kube-apiserver.yamlwith a root editor:
spec.containers[0].volumeMounts add:spec.volumes add:- On any machine with kubectl access, after the apiserver pods are running again, re-encrypt existing Secret resources so they are stored encrypted in etcd. First label all namespaces that should be processed (example: all non-system namespaces):
- On every control plane node, verify that the kube-apiserver process is now using the encryption-provider-config flag:
Using kubectl
Using kubectl
kubectl cannot modify the API server’s host-level static pod manifest or its process flags. This finding must be remediated directly on every control plane node by editing
/etc/kubernetes/manifests/kube-apiserver.yaml and configuring the encryption provider config there; see the Manual Steps section for the full procedure.Automation
Automation

