> For the complete documentation index, see [llms.txt](https://docs.sprinto.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinto.com/monitors/cloud-and-infrastructure-monitoring/gcp/gke-metadata-enabled-check.md).

# GKE Metadata Enabled Check

### **Overview**

The **GCP\_GKE\_METADATA\_SERVER\_ENABLED** monitor verifies whether the Google Kubernetes Engine (GKE) Metadata Server is enabled for your workloads and node pools. Enabling the metadata server improves security by allowing workloads to securely obtain metadata without directly accessing the node’s metadata server.

### Passing Criteria

The monitor is considered **passing** when both of the following conditions are met:

#### 1. Workload Identity is Enabled

* The value of `entity.metaData.workloadIdentityConfig.workloadPool` must be defined (non-null and non-undefined).

#### 2. All Node Pools Have Metadata Server Enabled

* For every node pool in `entity.metaData.nodePools`, the value of `pool.config.workloadMetadataConfig.mode` must be either:
  * `GKE_METADATA_SERVER`, or
  * `GKE_METADATA`

#### **Summary**

* **Workload identity** is configured.
* **Every node pool** has `workloadMetadataConfig.mode` set to `GKE_METADATA_SERVER` or `GKE_METADATA`.
* If either condition is not met, `isMonitorPassing` will be **false**.

### **How to Remediate**

If the monitor fails, follow these steps:

#### **1. Enable Workload Identity**

1. Go to the **Google Cloud Console**.
2. Navigate to **Kubernetes Engine** → **Clusters**.
3. Select the target cluster.
4. Under **Security**, locate **Workload Identity**.
5. Enable it and specify the **workload pool** (for example, `<PROJECT_ID>.svc.id.goog`).
6. Save the configuration and redeploy the workloads if required.

**Reference:** [Workload Identity overview – Google Cloud](https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity)

#### **2. Enable Metadata Server for All Node Pools**

1. In the Google Cloud Console, go to **Kubernetes Engine** → **Clusters**.
2. Select the cluster and open the **Node pools** tab.
3. For each node pool:
   * Edit the node pool configuration.
   * Under **Metadata**, set **Workload metadata** to **GKE\_METADATA\_SERVER** (or **GKE\_METADATA** if applicable).
4. Save changes and allow the node pool to be updated.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sprinto.com/monitors/cloud-and-infrastructure-monitoring/gcp/gke-metadata-enabled-check.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
