More Info:
Use the Container-Optimized OS (cos_containerd) image for GKE nodes, which is hardened and minimizes the attack surface. Other images carry more packages and larger exposure.Risk Level
MediumAddress
SecurityCompliance Standards
- CIS GKE
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
List all node pools and their image types
Run on any machine with gcloud configured: -
Identify non‑compliant node pools
From the output, note any node pool whereconfig.imageTypeis notCOS_CONTAINERD(e.g.UBUNTU,UBUNTU_CONTAINERD,COS) for further review. -
Assess workload and feature compatibility before changing images
For each non‑COS_CONTAINERD node pool:- Confirm workloads don’t rely on OS‑specific packages, custom agents, or kernel modules only present on the current image.
- Confirm any node‑level DaemonSets (monitoring, logging, security agents) support
cos_containerd. - If unsure, create or use a test cluster/node pool with
cos_containerdand validate workloads there first.
-
Plan and execute node pool image migration
For each node pool you decide to migrate, run on any machine with gcloud configured:This recreates nodes in that pool with the new image and will cause pod evictions and rescheduling; perform during a maintenance window and ensure PodDisruptionBudgets and autoscaling are configured appropriately. -
Verify node pool image types after upgrade
Re‑run, on any machine with gcloud configured:Confirm all intended node pools now showCOS_CONTAINERDasconfig.imageType. -
Spot‑check via the original audit command
Optionally, for each node pool, run:Ensure the value returned is"COS_CONTAINERD"for compliant node pools.
Using kubectl
Using kubectl
kubectl cannot modify the node image type or node pool configuration; this setting is managed at the GKE control-plane / cloud-provider level (gcloud, console, or IaC). To address this finding, follow the guidance in the Manual Steps section using the appropriate GCP tools.
Automation
Automation

