More Info:

Encrypt Kubernetes secrets, stored in etcd, at the application-layer using a customermanaged key in Cloud KMS.

Risk Level

Medium

Address

Security, Reliability, Operational Excellence, Performance Efficiency

Compliance Standards

CISGKE

Triage and Remediation

Remediation

To remediate the misconfiguration “Ensure Kubernetes Secrets Are Encrypted Using KMS Keys” in GCP using the GCP console, follow the below steps:

  1. Open the Google Kubernetes Engine (GKE) cluster in the GCP console.

  2. Navigate to the “Workloads” tab on the left-hand side menu and select the deployment that you want to remediate.

  3. Click on the “Edit” button at the top of the screen.

  4. Scroll down to the “Environment Variables” section and click on “Add Environment Variable”.

  5. Add the following environment variable:

    Name: GOOGLE_ENCRYPTION_KEY

    Value: [the name of the KMS key you want to use to encrypt the secrets]

  6. Click on the “Save” button at the bottom of the screen to save the changes.

  7. Repeat steps 4-6 for each deployment that needs to be remediated.

By following these steps, you have ensured that Kubernetes secrets are encrypted using KMS keys in GCP.

Additional Reading: