Infra provision cluster

From GoogleCloudPlatform/k8s-bridge · View interactive version

Infra provision cluster is an AI agent skill from the GitHub repository GoogleCloudPlatform/k8s-bridge. Creates, resizes, updates, or deletes cloud Kubernetes clusters and CPU or GPU node pools on GKE (standard CPU node pools, Node Auto-Provisioning for Custom Compute Classes, DWS Flex-start GPU node pools, or labeling pre-provisioned GPU nodes). Use when creating, resizing, updating, or deleting clou

How to use this skill

Skill file

Cloud Cluster & Node Pool Provisioning (`infra-provision-cluster`)

1. Preconditions & Inputs

Before running gcloud or kubectl label commands, check or ask the user for:

  1. PROJECT_ID, LOCATION (zone or region), and CLUSTER_NAME.
  2. Provisioning Mode:

2. Guardrails


3. Step-by-Step Procedure

Branch Selection: Select Option A (Step 1), Option B (Step 2), or Option C (Step 3). Run Step 4 only when asked to resize or delete a cloud cluster or node pool.

Step 1: Option A — Create or Update a Standard CPU Cluster / Node Pool or GKE CCC Cluster

After user confirmation, create or resize the standard GKE cluster/node pool, or run the gcloud commands in the cluster creation section of docs/gke/ccc.md.

Step 2: Option B — Create a GKE Cluster and DWS Flex-Start GPU Node Pool

After user confirmation, run the gcloud cluster and node pool creation commands in docs/gke/gpu-dws-workloads.md.

Step 3: Option C — Verify and Label Pre-Provisioned GPU Nodes

Follow ## Prerequisites in docs/gpu-workloads.md to verify nvidia.com/gpu allocatable capacity and ensure the GPU model label matched by WorkloadMixing.spec.mappedResources[].nodeSelectors is present.

Step 4: Cloud Cluster or Node Pool Teardown (Run ONLY When Requested to Delete Cloud Infra)

First remove in-cluster CRs (infra-configure-crs) and operators (infra-deploy-stack). After user confirmation, follow the cleanup section of docs/gke/ccc.md or docs/gke/gpu-dws-workloads.md (or run gcloud container node-pools delete <GPU_NODE_POOL_NAME> --cluster=<CLUSTER_NAME> --location=<LOCATION> --project=<PROJECT_ID> to delete only a node pool).


4. Verification

  1. Confirm kubectl config current-context targets the cluster and the cluster/node pools are RUNNING (CCC and DWS Flex-start --num-nodes=0 --min-nodes=0 scale from 0 on workload admission; pre-provisioned GPU nodes immediately expose nvidia.com/gpu capacity and the nodeSelectors label).

5. Handoffs & Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.