canonical: https://jentic.com/apis/googleapis.com/gkeonprem

# Google GKE On-Prem API

The GKE On-Prem API manages Anthos clusters that run on customer hardware, including bare metal admin and user clusters and VMware-based clusters. It supports cluster creation, upgrades, enrollment of existing clusters, and version queries, integrating on-prem clusters with the rest of Google Cloud's control plane. The API works alongside GKE Hub so on-prem clusters appear in fleets and can receive fleet-level features.

## For AI agents

Provision, upgrade, and enroll on-prem Anthos clusters on bare metal or VMware, including admin and user clusters. Built for platform teams running Kubernetes outside Google Cloud.

## Scope

Does not provision cloud-hosted GKE, run workloads inside clusters, or manage IAM directly - use the Container API for cloud GKE, the cluster's Kubernetes API for workloads, and Cloud IAM for role bindings.

## Capabilities

- Create bare metal admin and user clusters in a given Cloud location
- Enroll an existing on-prem cluster into the GKE On-Prem control plane
- Query supported version configurations for a cluster type
- List, get, update, and delete clusters managed by the API
- Unenroll a cluster from Google Cloud without destroying it
- List long-running operations and cancel them when needed

## Use cases

### Provision an On-Prem Anthos Bare Metal Cluster

Enterprises that need Kubernetes on their own hardware use Anthos on bare metal to run a managed control plane locally. The GKE On-Prem API creates the bare metal admin cluster and subsequent user clusters in a Google Cloud location, providing a single API surface for cluster lifecycle. Once created, clusters are managed alongside cloud GKE clusters in the same project.

Example prompt: Call POST /v1/projects/{project}/locations/{location}/bareMetalAdminClusters with the network and node specs, then create user clusters under it.

### Enroll Existing On-Prem Clusters

Operators sometimes have legacy bare metal clusters they want to bring under Google Cloud control without recreating them. The enroll endpoints register an existing cluster with the GKE On-Prem API so it appears alongside other clusters and can receive lifecycle operations. Unenroll reverses the action, leaving the cluster intact.

Example prompt: Call POST /v1/{parent}/bareMetalAdminClusters:enroll with the local cluster details to register it, and verify with GET on the resulting resource name.

### Plan Cluster Upgrades

Before upgrading an on-prem cluster, operators need to know the exact target version supported for that cluster shape and the current version. The queryVersionConfig endpoints return supported versions and upgrade paths for bare metal admin and user clusters, supporting safe upgrade planning across many on-prem sites.

Example prompt: Call POST /v1/{parent}/bareMetalUserClusters:queryVersionConfig and use the returned version list to drive the upgrade plan for each cluster.

### Agent-Assisted On-Prem Cluster Lifecycle

An AI agent in a platform engineering toolchain can guide an operator through enrolling, upgrading, and decommissioning on-prem clusters. Through Jentic, the agent searches for the right cluster operation by intent, loads its schema, and executes it under the operator's IAM scope without holding raw service account keys.

Example prompt: Use Jentic to search 'enroll a bare metal cluster', load the enroll schema, and execute it for the target cluster identifier.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /v1/{+parent}/bareMetalAdminClusters | List bare metal admin clusters |
| POST | /v1/{+parent}/bareMetalAdminClusters | Create a bare metal admin cluster |
| POST | /v1/{+parent}/bareMetalAdminClusters:enroll | Enroll an existing bare metal admin cluster |
| POST | /v1/{+parent}/bareMetalAdminClusters:queryVersionConfig | Query supported versions for admin clusters |
| GET | /v1/{+parent}/bareMetalClusters | List bare metal user clusters |
| POST | /v1/{+parent}/bareMetalClusters | Create a bare metal user cluster |
| POST | /v1/{+parent}/bareMetalClusters:enroll | Enroll an existing bare metal user cluster |
| DELETE | /v1/{+name}:unenroll | Unenroll a cluster without destroying it |

## Key resources

- **bareMetalAdminClusters** — Anthos bare metal admin clusters; create, enroll, list, get, patch, delete.
- **bareMetalClusters** — Bare metal user clusters managed under an admin cluster.
- **vmwareClusters** — Anthos clusters on VMware (where supported).
- **operations** — Long-running operations for cluster lifecycle calls.

## Why Jentic

- **Setup:** Wiring the GKE On-Prem API by hand means standing up Google OAuth 2.0 with a service account, requesting the cloud-platform scope, and polling the long-running cluster enroll and create operations yourself. Through Jentic you install once, import the GKE On-Prem API from the API Directory, store the service-account credential once, and your agent calls it.
- **Permission scoping:** GKE On-Prem puts the parent project and location in the URL path (/v1/{parent}/bareMetalClusters, /v1/{parent}/bareMetalAdminClusters), so a rule can pin your agent to one project and location: it can list and enroll clusters there and nothing else. You choose the operations it may call, so unenroll is not included unless you add it.
- **Credential handling:** Your Google service-account credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'enroll a bare metal cluster' or 'query version config', and Jentic returns the matching operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **GKE Hub API** — Registers on-prem clusters into fleets and applies fleet-wide features.
- **Kubernetes Engine API** — Manages Kubernetes clusters that run in Google Cloud rather than on-prem.
- **Backup for GKE API** — Backs up workloads on clusters managed via this API where supported.
- **Cloud IAM API** — Configures the IAM roles and service accounts used by GKE On-Prem operations.

## FAQ

### What authentication does the GKE On-Prem API use?

It uses Google OAuth 2.0 with the cloud-platform scope, typically through a service account with anthos and gkeonprem-related IAM roles. Through Jentic, credentials live encrypted in the vault and agents receive scoped bearer tokens.

### Can I create a bare metal user cluster with this API?

Yes. Once a bare metal admin cluster exists, call POST /v1/{parent}/bareMetalClusters with the desired control-plane and node-pool spec to provision a user cluster under it.

### What are the rate limits for the GKE On-Prem API?

Google enforces standard per-project quotas on management calls. Cluster create and upgrade operations are long-running operations whose runtime depends on the underlying hardware, not the API rate.

### How do I enroll an existing on-prem cluster through Jentic?

Search Jentic for 'enroll a bare metal cluster', load the schema for POST /v1/{parent}/bareMetalAdminClusters:enroll or the user-cluster equivalent, and execute it with the existing cluster's local identifier.

### Is the GKE On-Prem API free?

The API itself has no separate charge, but Anthos on bare metal and Anthos on VMware have per-vCPU subscription pricing. See Anthos pricing for current rates.

### Does this API run workloads on the cluster?

No. The API only manages cluster lifecycle. Workload deployment happens via the cluster's Kubernetes API once the cluster is created or enrolled.

### Can I limit what my agent is allowed to do with the GKE On-Prem API?

Yes. Because you self-host Jentic One, your own rules decide which GKE On-Prem operations and which Google service-account credential the agent may use. Since this API puts the parent project and location in the URL path (/v1/{parent}/bareMetalClusters and /v1/{parent}/bareMetalAdminClusters), you can pin the agent to a single project and location and allow only the operations you choose, such as listing and enrolling clusters. Destructive calls like unenroll stay off unless you explicitly add them.
