lacework-global-794
Use Container-Optimized OS (cos_containerd) for Google Kubernetes Engine (GKE) node images (Automated)
Description
Use Container-Optimized OS (cos_containerd) as a managed, optimized and hardened base OS that limits the host's attack surface.
Remediation
Using Google Cloud Console:
- Go to Kubernetes Engine by visiting: https://console.cloud.google.com/kubernetes/list.
- Select the Kubernetes cluster which does not use Container-Optimized OS (COS).
- Under the Node pools heading, select the Node Pool that requires alteration.
- Click Edit.
- Under the Image Type heading click CHANGE.
- From the pop-up menu select Container-optimised OS with containerd (cos_containerd) (default) and click CHANGE.
- Repeat for any remaining non-compliant Node pools.
Using Command Line:
To set the node image to cos for an existing cluster's Node pool:
gcloud container clusters upgrade <cluster_name> --image-type cos_containerd --zone <compute_zone> --node-pool <node_pool_name>
References
https://cloud.google.com/kubernetes-engine/docs/concepts/using-containerd
https://cloud.google.com/kubernetes-engine/docs/concepts/node-images