{"data":{"slug":"github-google-skills-skills-cloud-gke-cluster-creation-3f706b244d5d","title":"Create and Configure GKE Clusters","summary":"Plans and executes GKE cluster creation, provisioning, and production readiness audits using pre-defined templates for Autopilot, Standard, GPU, and AI Hypercompute modes.","url":"https:\/\/skillshunter.net\/skills\/github-google-skills-skills-cloud-gke-cluster-creation-3f706b244d5d","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-google-skills-skills-cloud-gke-cluster-creation-3f706b244d5d","markdown_url":"https:\/\/skillshunter.net\/skills\/github-google-skills-skills-cloud-gke-cluster-creation-3f706b244d5d.md","download_url":"https:\/\/skillshunter.net\/skills\/github-google-skills-skills-cloud-gke-cluster-creation-3f706b244d5d\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before executing any `gcloud`, REST API, or MCP command, you MUST read [Usage Attribution](references\/attribution.md). For commands executed directly in the terminal, prefix `gcloud` with `CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\/1.0 (skill:gke-cluster-creation)\"` and append `agent-skills\/1.0 (skill:gke-cluster-creation)` to `User-Agent` headers.","instructions":"---\nname: gke-cluster-creation\ndescription: >-\n  Plans and executes GKE cluster creation, provisioning, and production\n  readiness audits using pre-defined templates (Autopilot, Standard Regional,\n  GPU\/AI Inference, AI Hypercompute). Use when creating GKE clusters,\n  provisioning GKE environments, selecting cluster modes, or auditing GKE\n  clusters. Don't use for application onboarding or deployment configuration\n  (use gke-app-onboarding instead).\nmetadata:\n  version: \"1.0.1\"\n  category: Containers\n---\n\n# GKE Cluster Creation\n\nThis reference guides creating Google Kubernetes Engine (GKE) clusters by\nproviding a set of best-practice templates and guiding through mode selection\nand customization. The **golden path Autopilot** configuration is the default\nfor all new clusters.\n\n> **MCP Tools:** `list_clusters`, `create_cluster`, `get_cluster`,\n> `list_operations`, `get_operation`\n\n## Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read [Usage Attribution](references\/attribution.md). For commands executed\ndirectly in the terminal (never in generated scripts, Terraform, or user code),\nprefix `gcloud` with\n`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\/1.0 (skill:gke-cluster-creation)\"`\nand append `agent-skills\/1.0 (skill:gke-cluster-creation)` to `User-Agent` headers.\n\n## Workflow\n\n1.  **Discover context**: Use `list_clusters` to see existing clusters. Use\n    `gcloud config get-value project` if project unknown.\n2.  **Gather inputs**: `project_id`, `location` (region or zone),\n    `cluster_name`, environment type. If missing essential details, ask the user\n    before taking action.\n3.  **Select mode & explain trade-offs**: If the user hasn't specified a\n    template or mode, present the available templates (e.g., Autopilot, Standard\n    Regional, GPU Inference, AI Hypercompute) and explain key trade-offs (Cost\n    vs. Availability, Autopilot vs. Standard node management).\n4.  **Configure networking**: auto-create subnet (default) or bring-your-own.\n5.  **Review golden path settings**: present the default configuration block\n    (`gcloud` command or `create_cluster` JSON payload) and confirm with the\n    user before creation.\n6.  **Create**: Use MCP `create_cluster` tool or `gcloud` CLI.\n7.  **Track**: Use `get_operation` to monitor creation progress.\n8.  **Verify**: Use `get_cluster` with `readMask=\"*\"` to confirm golden path\n    settings applied.\n\n## Mode Selection\n\n| Criteria           | Autopilot (Golden Path)   | Standard                  |\n| ------------------ | ------------------------- | ------------------------- |\n| Node management    | Google-managed            | Self-managed              |\n| Pricing            | Pay per pod resource      | Pay per node (VM)         |\n:                    : request                   :                           :\n| Node customization | Via ComputeClasses        | Full control              |\n| DaemonSets         | Allowed (with             | Full control              |\n:                    : restrictions)             :                           :\n| GPU\/TPU            | Supported via             | Supported via node pools  |\n:                    : ComputeClasses            :                           :\n| Best for           | Most production workloads | Kernel tuning, custom OS, |\n:                    :                           : privileged workloads      :\n\n> **Rule**: Default to Autopilot unless the customer has a specific requirement\n> that Autopilot cannot satisfy.\n\n## Best Practices\n\nWhen guiding the user or generating configurations, adhere to these GKE best\npractices:\n\n### Security & Networking\n\n1.  **Private Clusters**: Default to private clusters (`enablePrivateNodes:\n    true`) with a private control plane and restricted public endpoints\n    (`enable-master-authorized-networks`) to minimize attack surface.\n2.  **VPC-Native Networking**: Use VPC-native clusters (`useIpAliases: true` \/\n    `--enable-ip-alias`) to enable alias IP ranges and pod-level firewall rules.\n3.  **Workload Identity**: Prefer Workload Identity (`workloadPool:\n    <PROJECT_ID>.svc.id.goog`) for securely granting GKE workloads access to\n    Google Cloud services instead of static service account keys.\n4.  **Shielded GKE Nodes**: Enable Shielded GKE Nodes\n    (`--enable-shielded-nodes`, `--enable-secure-boot`) against rootkits and\n    bootkits.\n5.  **Least Privilege (RBAC)**: Institute strict Role-Based Access Control\n    limits (`scoped-rbs-bindings`).\n\n### Cost Optimization\n\n1.  **Autoscaling**: Enable Cluster Autoscaler and Horizontal\/Vertical Pod\n    Autoscaler (`--enable-autoscaling`, `--enable-vertical-pod-autoscaling`) to\n    adjust resources based on demand.\n2.  **Right-Sizing & Spot VMs**: Choose appropriate machine types and node\n    counts. Consider Spot VMs (`--spot`) for fault-tolerant, non-critical batch\n    or inference workloads.\n\n### High Availability & Reliability\n\n1.  **Regional Clusters**: Use Regional Clusters for production environments to\n    ensure control plane replication across multiple zones (`--region` instead\n    of `--zone`). *Note: Standard regional creates nodes across 3 zones by\n    default.*\n2.  **Pod Disruption Budgets**: Recommend setting Pod Disruption Budgets for\n    application stability during node maintenance.\n3.  **Release Channels**: Subscribe to a release channel (`REGULAR` or `STABLE`)\n    for automated, safer cluster upgrades.\n\n## Templates\n\n### 1. Golden Path Autopilot (Production)\n\nThis is the default. All settings match\n`..\/gke-golden-path\/assets\/golden-path-autopilot.yaml`.\n\n**Via gcloud:**\n\n```bash\ngcloud container clusters create-auto <CLUSTER_NAME> \\\n  --region <REGION> \\\n  --project <PROJECT_ID> \\\n  --release-channel regular \\\n  --enable-private-nodes \\\n  --enable-master-authorized-networks \\\n  --enable-dns-access \\\n  --enable-secret-manager \\\n  --secret-manager-rotation-interval=120s \\\n  --scoped-rbs-bindings \\\n  --monitoring=SYSTEM,API_SERVER,SCHEDULER,CONTROLLER_MANAGER,STORAGE,POD,DEPLOYMENT,STATEFULSET,DAEMONSET,HPA,CADVISOR,KUBELET,DCGM \\\n  --quiet\n```\n\n**Via MCP (`create_cluster`):**\n\n```json\n{\n  \"parent\": \"projects\/<PROJECT_ID>\/locations\/<REGION>\",\n  \"cluster\": {\n    \"name\": \"<CLUSTER_NAME>\",\n    \"autopilot\": { \"enabled\": true },\n    \"privateClusterConfig\": { \"enablePrivateNodes\": true },\n    \"masterAuthorizedNetworksConfig\": {\n      \"privateEndpointEnforcementEnabled\": true\n    },\n    \"releaseChannel\": { \"channel\": \"REGULAR\" },\n    \"secretManagerConfig\": {\n      \"enabled\": true,\n      \"rotationConfig\": { \"enabled\": true, \"rotationInterval\": \"120s\" }\n    },\n    \"rbacBindingConfig\": {\n      \"enableInsecureBindingSystemAuthenticated\": false,\n      \"enableInsecureBindingSystemUnauthenticated\": false\n    }\n  }\n}\n```\n\n### 2. Autopilot Dev\/Test\n\nRelaxes some golden path defaults for cost savings and easier access in\nnon-production.\n\n**Via gcloud:**\n\n```bash\ngcloud container clusters create-auto <CLUSTER_NAME> \\\n  --region <REGION> \\\n  --project <PROJECT_ID> \\\n  --release-channel rapid \\\n  --quiet\n```\n\n**Via MCP (`create_cluster`):**\n\n```json\n{\n  \"parent\": \"projects\/<PROJECT_ID>\/locations\/<REGION>\",\n  \"cluster\": {\n    \"name\": \"<CLUSTER_NAME>\",\n    \"autopilot\": { \"enabled\": true },\n    \"releaseChannel\": { \"channel\": \"RAPID\" }\n  }\n}\n```\n\n> **Warning**: This does not apply golden path security hardening. Suitable for\n> dev\/test only.\n\n### 3. Standard Regional (High Availability \/ Custom Requirements)\n\nBest when Autopilot cannot be used (e.g., custom kernel tuning, specific node OS\nrequirements). Creates 3 nodes across zones by default.\n\n**Via gcloud:**\n\n```bash\ngcloud container clusters create <CLUSTER_NAME> \\\n  --region <REGION> \\\n  --project <PROJECT_ID> \\\n  --num-nodes 3 \\\n  --machine-type e2-standard-4 \\\n  --disk-type pd-balanced \\\n  --enable-autoscaling --min-nodes 1 --max-nodes 10 \\\n  --enable-shielded-nodes --enable-secure-boot \\\n  --workload-pool=<PROJECT_ID>.svc.id.goog \\\n  --enable-private-nodes \\\n  --enable-master-authorized-networks \\\n  --enable-vertical-pod-autoscaling \\\n  --enable-dataplane-v2 \\\n  --release-channel regular \\\n  --quiet\n```\n\n**Via MCP (`create_cluster`):**\n\n```json\n{\n  \"parent\": \"projects\/<PROJECT_ID>\/locations\/<REGION>\",\n  \"cluster\": {\n    \"name\": \"<CLUSTER_NAME>\",\n    \"initialNodeCount\": 3,\n    \"nodeConfig\": {\n      \"machineType\": \"e2-standard-4\",\n      \"diskType\": \"pd-balanced\",\n      \"diskSizeGb\": 100,\n      \"oauthScopes\": [\"https:\/\/www.googleapis.com\/auth\/cloud-platform\"],\n      \"shieldedInstanceConfig\": {\n        \"enableSecureBoot\": true,\n        \"enableIntegrityMonitoring\": true\n      },\n      \"workloadMetadataConfig\": {\n        \"mode\": \"GKE_METADATA\"\n      }\n    },\n    \"privateClusterConfig\": { \"enablePrivateNodes\": true },\n    \"releaseChannel\": { \"channel\": \"REGULAR\" },\n    \"workloadIdentityConfig\": {\n      \"workloadPool\": \"<PROJECT_ID>.svc.id.goog\"\n    }\n  }\n}\n```\n\n### 4. GPU Inference & AI Workloads (L4 \/ ComputeClass)\n\nBest for: AI\/ML Inference, small model serving. Can be provisioned via\nAutopilot + ComputeClass or via Standard node pool with `g2-standard-4`\n(`nvidia-l4`). *Note: Requires `g2-standard-4` quota.*\n\n**Autopilot ComputeClass \/ GIQ approach:**\n\n```bash\n# 1. Create golden path cluster (same as template 1)\ngcloud container clusters create-auto <CLUSTER_NAME> \\\n  --region <REGION> --project <PROJECT_ID> \\\n  --enable-private-nodes --enable-master-authorized-networks \\\n  --enable-dns-access --enable-secret-manager --scoped-rbs-bindings \\\n  --quiet\n\n# 2. Apply GPU ComputeClass (see gke-compute-classes.md)\nkubectl apply -f gpu-compute-class.yaml\n\n# 3. Or use GIQ for inference (see gke-inference.md)\ngcloud container ai profiles manifests create \\\n  --model=gemma-2-9b-it --model-server=vllm --accelerator-type=nvidia-l4 --quiet > inference.yaml\nkubectl apply -f inference.yaml\n```\n\n**Standard Node Pool approach via MCP (`create_cluster`):**\n\n```json\n{\n  \"parent\": \"projects\/<PROJECT_ID>\/locations\/<REGION>\",\n  \"cluster\": {\n    \"name\": \"<CLUSTER_NAME>\",\n    \"initialNodeCount\": 1,\n    \"nodeConfig\": {\n      \"machineType\": \"g2-standard-4\",\n      \"accelerators\": [\n        {\n          \"acceleratorCount\": \"1\",\n          \"acceleratorType\": \"nvidia-l4\"\n        }\n      ],\n      \"diskSizeGb\": 100,\n      \"oauthScopes\": [\"https:\/\/www.googleapis.com\/auth\/cloud-platform\"]\n    }\n  }\n}\n```\n\n### 5. AI Hypercompute (A3 HighGPU \/ Large Model Serving)\n\nBest for: Large-scale LLM \/ AI model training and hypercompute inference. *Note:\nHigh hourly cost and strict quota requirements (`a3-highgpu-8g` \/\n`nvidia-h100-80gb-hbm3`).*\n\n**Via gcloud:**\n\n```bash\ngcloud container clusters create <CLUSTER_NAME> \\\n  --region <REGION> \\\n  --project <PROJECT_ID> \\\n  --num-nodes 1 \\\n  --machine-type a3-highgpu-8g \\\n  --accelerator type=nvidia-h100-80gb-hbm3,count=8 \\\n  --disk-size 200 \\\n  --scopes https:\/\/www.googleapis.com\/auth\/cloud-platform \\\n  --workload-pool=<PROJECT_ID>.svc.id.goog \\\n  --release-channel regular \\\n  --quiet\n```\n\n**Via MCP (`create_cluster`):**\n\n```json\n{\n  \"parent\": \"projects\/<PROJECT_ID>\/locations\/<REGION>\",\n  \"cluster\": {\n    \"name\": \"<CLUSTER_NAME>\",\n    \"initialNodeCount\": 1,\n    \"nodeConfig\": {\n      \"machineType\": \"a3-highgpu-8g\",\n      \"accelerators\": [\n        {\n          \"acceleratorCount\": \"8\",\n          \"acceleratorType\": \"nvidia-h100-80gb-hbm3\"\n        }\n      ],\n      \"diskSizeGb\": 200,\n      \"oauthScopes\": [\"https:\/\/www.googleapis.com\/auth\/cloud-platform\"]\n    }\n  }\n}\n```\n\n## Instructions\n\n-   **ALWAYS** ask for `project_id` if not in context.\n-   **ALWAYS** ask for `region` (or location).\n-   **ALWAYS** ask for a unique `cluster_name`.\n-   **DEFAULT** to golden path Autopilot unless customer specifies otherwise or\n    has custom node\/kernel\/hypercompute requirements.\n-   **ALWAYS WARN** when deviating to GKE Standard, highlighting that it\n    deviates from the golden path and explaining the added\n    operational\/management overhead (manually managing node pools, upgrades, and\n    autoscaling).\n-   **EXPLAIN TRADE-OFFS** when presenting templates or mode choices to the user\n    if they haven't specified one (e.g., Autopilot vs Standard, Cost vs\n    Availability).\n-   **PRESENT THE CONFIGURATION** block (`gcloud` command or JSON payload) and\n    ask for confirmation before calling any creation tool.\n-   **WARN** about Day-0 decisions (networking, private nodes) that are hard to\n    change later.\n-   **WARN** explicitly about cost and quota requirements when the user selects\n    GPU (`g2-standard-4`, `a3-highgpu-8g`), TPU, or multi-region\/regional\n    clusters (`--region` defaults to 3 zones).\n-   When using MCP `create_cluster`, the `cluster.name` parameter should be the\n    **short name** (e.g., `my-cluster`), not the full resource path\n    (`projects\/<PROJECT_ID>\/locations\/<REGION>\/clusters\/<CLUSTER_NAME>`). The\n    `parent` parameter defines the scope\n    (`projects\/<PROJECT_ID>\/locations\/<REGION>`).\n","use_cases":["Provisioning a new GKE cluster for production workloads","Setting up a cluster with custom node configurations","Auditing existing GKE clusters for compliance and performance"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/google\/skills\/blob\/e3c591afe426ea585e4c21799e5199d6d47cd1be\/skills\/cloud\/gke-cluster-creation\/SKILL.md","source_commit":"e3c591afe426ea585e4c21799e5199d6d47cd1be","license":null,"version":null,"listing_approved_at":"2026-11-17","created_at":"2026-11-16T15:49:29.000000Z","updated_at":"2026-11-17T10:20:00.000000Z","seo_title":"Create GKE Cluster with Templates","seo_description":"Create and configure GKE clusters using pre-defined templates for Autopilot, Standard, GPU, and AI Hypercompute modes.","seo_keywords":["create GKE cluster","configure GKE cluster","GKE cluster templates","GKE cluster provisioning","GKE cluster audit"]}}