> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/compute/appsec-gcp-22.md).

# GCP Kubernetes Engine Clusters not using Container-Optimized OS for Node image misconfiguration dete

## Rule Details

|                        |                                      |
| ---------------------- | ------------------------------------ |
| Cortex AppSec Rule ID  | APPSEC\_GCP\_22                      |
| Category - Subcategory | Kubernetes - Resource Management     |
| Provider               | GCP                                  |
| Severity               | LOW                                  |
| Framework              | Terraform, Terraform Plan            |
| Mapped CSPM/KSPM Rule  | 84aedafc-aec4-4e7d-a604-a0a0ea1fd3ca |

## Impact

GKE enables users to select the operating system image that runs on each node. You can also upgrade an existing cluster to use a different node image type. GKE supports several OS images using the main container runtime directly integrated with Kubernetes, including *cos\_containerd* and *ubuntu\_containerd*. We recommend you use *cos\_containerd* and *ubuntu\_containerd* to enhance node security. *Containerd* is an industry-standard container runtime component that regularly updates security fixes and patches, providing better support, security, and stability than other images.

## How to Fix

Add the *image\_type* argument into the *node\_config* bloc to your *google\_container\_cluster* or *google\_container\_node\_pool* resource:

***

## hcl node\_config { image\_type = "COS" }

It should force the cluster to recreate a node following the new configuration. For further information please follow this link: <https://www.terraform.io/docs/providers/google/r/container\\_cluster.html#image\\_type>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/compute/appsec-gcp-22.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
