Skip to main content

More Info:

Where etcd encryption is used, appropriate providers should be configured.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. Identify the current encryption provider config file (if any)
    Run on every control plane node:
    If present, note the path after --encryption-provider-config= (for example /etc/kubernetes/encryption-config.yaml). If not present, you will add this flag in a later step.
  2. Create or edit the EncryptionConfig file with a strong provider
    Run on every control plane node. Adjust the path if you already have a config file; otherwise use the example path below:
    Put content similar to this, ensuring the first provider under resources.providers is one of aescbc, kms, or secretbox (example uses aescbc):
    Generate a 32‑byte key and base64-encode it (run once, then paste the output in place of REPLACE_WITH_BASE64_ENCODED_32_BYTE_KEY):
  3. Ensure kube-apiserver uses the EncryptionConfig file
    Run on every control plane node and edit the static pod manifest:
    In the command: or args: list, ensure there is an entry like:
    Save the file. Because this is a static pod manifest under /etc/kubernetes/manifests, the kubelet will automatically restart the API server; expect a brief control-plane interruption.
  4. Optionally re-encrypt existing resources with the new provider
    Run on any machine with kubectl access (with cluster-admin privileges). This is an operational decision; coordinate during a maintenance window for large clusters.
    This forces secrets to be rewritten and stored using the configured encryption provider.
  5. Verify the effective encryption provider
    Run on every control plane node (after kube-apiserver has restarted):
    Confirm the printed provider= line shows aescbc, kms, or secretbox as the first provider.
kubectl cannot modify the kube-apiserver static pod manifest or its --encryption-provider-config setting; those are host-level files under /etc/kubernetes/manifests on every control plane node. To address this finding, follow the guidance in the Manual Steps section and apply the changes directly on the control plane nodes.

Additional Reading: