Other Articles

EKS Cluster – Enable Secrets Encryption

Secure Configuration Checks > AWS

This check ensures that the Kubernetes secrets of an Amazon EKS cluster are encrypted with an AWS KMS key. Secrets often hold passwords, tokens and certificates. Envelope encryption with a key that you control adds a second layer of protection for this data at rest.

Check Details

  • Resource: EKS Cluster
  • Check: Enable EKS cluster secrets encryption (SecretsEncryptionEnabled)
  • Risk: Anyone who gets access to the cluster data store or its backups can read the secrets in clear text

Remediation via AWS Console

  1. Open the Amazon EKS console and select the affected cluster.

    Amazon EKS Console
  2. Open the Configuration tab. Under Cluster configuration, click Manage.

  3. Open Envelope encryption and verify that the encryption key is set to AWS owned.

    Amazon EKS Console
  4. If your security policy requires a customer-managed KMS key, configure the required key.

  5. Repeat for every affected cluster.

Note: Kubernetes 1.28 and later automatically use envelope encryption with an AWS-owned KMS key. No manual configuration is required unless a customer-managed key is mandated by your security policy.

Remediation via AWS CLI

  1. Log in to the AWS Management Console and click the CloudShell icon (>_) in the top-right corner.

    AWS CloudShell
  2. List the clusters that do not encrypt secrets:

    for c in $(aws eks list-clusters --query 'clusters[]' --output text); do
      aws eks describe-cluster --name "$c" --output json | \
      jq -r '.cluster
        | select(([.encryptionConfig[]?
                   | select(.resources | index("secrets"))] | length) == 0)
        | .name'
    done
    

    The command covers one region. Add --region <region> to each aws command to check another.

  3. If you do not have a KMS key yet, create a symmetric key and note its ARN. Skip this step if you already have one:

    aws kms create-key \
    --description "EKS secrets encryption" \
    --query 'KeyMetadata.[KeyId,Arn]' \
    --output text
    
    aws kms enable-key-rotation --key-id <kms-key-id>
    
    
  4. Enable secrets encryption on the cluster:

    aws eks associate-encryption-config \
    --cluster-name <cluster-name> \
    --encryption-config '[{"resources":["secrets"],"provider":{"keyArn":"<kms-key-arn>"}}]'
    

    Wait for the update to finish:

    aws eks wait cluster-active --name <cluster-name>
    
  5. Verify the encryption configuration:

    aws eks describe-cluster \
    --name <cluster-name> \
    --query 'cluster.encryptionConfig'
    

Replace <cluster-name> with the name of the cluster, for example prod-cluster. Replace <kms-key-id> and <kms-key-arn> with the ID and ARN of your key, for example arn:aws:kms:us-east-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. Repeat steps 4 and 5 for each cluster.

Updated on 03 November, 2026