More Info:
Running The Gke Metadata Server Prevents Workloads From Accessing Sensitive Instance Metadata And Facilitates Workload IdentityRisk Level
MediumAddress
SecurityCompliance Standards
- CIS GKE
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
List and review current cluster Workload Identity configuration
- Machine: Any machine with
gcloudconfigured - Command:
- Review: Confirm whether
workloadIdentityConfig/workloadPoolis set toPROJECT_ID.svc.id.goog. If not set, enabling Workload Identity (and thus defaulting new node pools to use the GKE Metadata Server) is likely required.
- Machine: Any machine with
-
Check each node pool’s metadata server configuration
- Machine: Any machine with
gcloudconfigured - Command:
- Review: For each node pool, confirm
modeisGKE_METADATA_SERVER. Any node pool with a different mode (e.g.GCE_METADATA,UNSPECIFIED, or null) does not have the GKE Metadata Server enabled.
- Machine: Any machine with
-
Assess application impact and readiness for Workload Identity
- Machine: Any machine with
kubectland cluster access - Commands (evidence gathering):
- Review:
- Identify workloads that currently rely on node service account credentials or direct instance metadata access.
- Determine which workloads will need to be updated to use GCP IAM via Workload Identity (e.g., binding Kubernetes ServiceAccounts to GCP service accounts).
- Machine: Any machine with
-
Decide and plan enabling Workload Identity and GKE Metadata Server
- If the cluster is not using Workload Identity, plan a change window to:
- Enable Workload Identity at cluster level.
- Migrate affected workloads to use Kubernetes ServiceAccounts mapped to GCP Service Accounts.
- If Workload Identity is already enabled but some node pools are not using
GKE_METADATA_SERVER, plan to update those node pools, considering any workloads tightly coupled to legacy metadata access patterns.
- If the cluster is not using Workload Identity, plan a change window to:
-
Enable Workload Identity at the cluster level (if not already enabled)
- Machine: Any machine with
gcloudconfigured - Command:
- Impact: Control-plane configuration change; does not automatically alter existing node pools, but new node pools will default to
--workload-metadata-from-node=GKE_METADATA_SERVER.
- Machine: Any machine with
-
Enable GKE Metadata Server on existing node pools and verify
- Machine: Any machine with
gcloudconfigured - Command (per node pool):
- Verification:
Confirm all node pools now report
"mode": "GKE_METADATA_SERVER".
- Machine: Any machine with
Using kubectl
Using kubectl
kubectl cannot enable the GKE Metadata Server or configure Workload Identity, because these settings are managed at the GKE control-plane and node pool level via gcloud/console/IaC, not through Kubernetes API objects. To remediate this finding, follow the guidance in the Manual Steps section using the Google Cloud Console or gcloud commands.
Automation
Automation

