More Info:
Enable application-layer secrets encryption so Kubernetes Secrets are encrypted at rest using a Cloud KMS key you control. This protects secret data beyond Googles default encryption.Risk Level
HighAddress
SecurityCompliance Standards
- CIS GKE
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Identify the GKE cluster(s) and current encryption status
Run on any machine withgcloudconfigured:Review whetherstateis"ENCRYPTED"and akeyNameis present. Ifstateis"DECRYPTED"orkeyNameis empty, application‑layer secrets encryption with Cloud KMS is not enabled. -
Decide the KMS project, location, and key structure
With your security/ops team, determine:- Which project will own the KMS key (
<key_project_id>). - Region (
<location>) that matches or is appropriate for your cluster. - Key ring name (
<ring_name>) and key name (<key_name>).
Document whether you will use a dedicated key per cluster, per environment, or shared across clusters, considering key‑rotation and access‑control policies.
- Which project will own the KMS key (
-
Create or verify the Cloud KMS key
If a suitable key does not already exist, create one (run on any machine withgcloud):If using an existing key, confirm it is of purposeENCRYPT_DECRYPTand in the correct region: -
Grant the GKE service agent access to the KMS key
First, identify the Kubernetes Engine Service Agent for the cluster project (run on any machine withgcloud):Then grant itroles/cloudkms.cryptoKeyEncrypterDecrypteron the key:Replace<service_account_name>with the email printed by the previous command. -
Enable application‑layer secrets encryption on the cluster
For a new cluster (decide whether to recreate vs update an existing cluster):To enable on an existing cluster:Assess operational impact: cluster control‑plane reconfiguration may temporarily affect control‑plane availability; coordinate during a maintenance window if needed. -
Verify encryption is enabled and using the intended key
After the update/recreate completes, run (any machine withgcloud):Confirm thatstateis"ENCRYPTED"and thatkeyNamematches
projects/<key_project_id>/locations/<location>/keyRings/<ring_name>/cryptoKeys/<key_name>.
Using kubectl
Using kubectl
kubectl cannot configure application-layer secrets encryption or Cloud KMS keys, because this setting is managed entirely in the GKE control plane via the Google Cloud Console,
gcloud CLI, or IaC. To remediate this finding, follow the guidance in the Manual Steps section for making the change at the cloud provider configuration level.Automation
Automation
- Any row with
STATE=NOT_ENCRYPTED:- The
databaseEncryptionblock is missing, or .databaseEncryption.stateis notENCRYPTED.- This means Kubernetes Secrets are not protected with Cloud KMS as required.
- The
- Any row with
STATE=MISCONFIGURED:stateisENCRYPTEDbutkeyNameis missing, or the cluster could not be described.- Requires manual review to ensure a valid Cloud KMS key is configured.
- Only rows with
STATE=OKmeet the requirement for CIS GKE 5.3.1.

