[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M720YJ99DX63H694AGY86DXH":3,"skill-same:01M720YJ99DX63H694AGY86DXH":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M720YJ99DX63H694AGY86DXH","gke-cost-optimization",null,"Optimizes GKE costs, rightsizes workloads, and configures Spot VMs, CUDs, cost allocation, and resource quotas. Use when optimizing GKE cluster or workload costs, configuring GKE cost allocation or quotas, rightsizing CPU\u002Fmemory requests, or selecting Spot VMs and machine types. Don't use for general compute class provisioning or GPU Selection (use gke-compute-classes instead).","gke-labs\u002Fkube-agents","gke-labs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F197140281?v=4","01M720MEZR8K6WD2WTHNQE346Q","01M720MF0BRA9RGH1QVT4J0M0E",126,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fagents\u002Fplatform\u002Fskills\u002Fgke-cost-optimization\u002FSKILL.md",[],[],"2026-11-10 18:39:20",false,"---\nname: gke-cost-optimization\ndescription: >-\n  Optimizes GKE costs, rightsizes workloads, and configures Spot VMs, CUDs, cost\n  allocation, and resource quotas. Use when optimizing GKE cluster or workload\n  costs, configuring GKE cost allocation or quotas, rightsizing CPU\u002Fmemory\n  requests, or selecting Spot VMs and machine types. Don't use for general\n  compute class provisioning or GPU Selection (use gke-compute-classes instead).\nmetadata:\n  category: CloudObservabilityAndMonitoring\n---\n\n# GKE Cost Optimization\n\nThis reference covers strategies and workflows for reducing Google Kubernetes\nEngine (GKE) costs while maintaining a secure and reliable posture.\n\n> **MCP Tools:** `get_k8s_resource`, `describe_k8s_resource`, `get_cluster`\n>\n> A change goes out as a pull request to the GitOps repository, never as a write from here: Kubernetes objects as YAML through `gke-manifest-generation`, cluster settings and other Google Cloud resources as Config Connector YAML through `gcp-config-connector`, opened with `submit-suggestion`. Each profile's config offers only the `gke` MCP server's read tools, and the broker refuses `kubectl` and `gcloud` writes.\n\n## Golden Path Cost Features\n\nThe golden path already includes cost-optimizing settings:\n\n| Setting                  | Value                  | Impact                  |\n| ------------------------ | ---------------------- | ----------------------- |\n| `autoscalingProfile`     | `OPTIMIZE_UTILIZATION` | Aggressive node         |\n:                          :                        : scale-down reduces idle :\n:                          :                        : compute                 :\n| `verticalPodAutoscaling` | `enabled`              | VPA recommendations     |\n:                          :                        : prevent                 :\n:                          :                        : over-provisioning       :\n| Autopilot pricing        | Pay per pod request    | No charge for unused    |\n:                          :                        : node capacity           :\n| Node Auto Provisioning   | enabled                | Right-sized node pools  |\n:                          :                        : created automatically   :\n\n## Workflows & Optimization Strategies\n\n### 1. Prerequisite: Cost Allocation & Monitoring\n\nTo enable GKE cost allocation (`--enable-cost-allocation`) for billing tracking\nacross namespaces and labels, inspect live cluster utilization (`kubectl top`),\nor run historical cost breakdown queries in BigQuery (`bq`), use the\n**`gke-cost-analysis`** skill. Once tracking is active and waste is diagnosed,\napply the optimization workflows below.\n\n### 2. Configure Resource Quotas\n\nResource quotas restrict total resource consumption across tenants in\nmulti-tenant clusters, preventing runaway costs. The quota is proposed as a pull request\nthrough `submit-suggestion`:\n\n```yaml\napiVersion: v1\nkind: ResourceQuota\nmetadata:\n  name: compute-quota\n  namespace: {namespace}\nspec:\n  hard:\n    requests.cpu: \"4\"\n    requests.memory: 16Gi\n    limits.cpu: \"8\"\n    limits.memory: 32Gi\n```\n\n### 3. Pod Rightsizing (VPA & MPA)\n\nAdjust pod resource requests to match actual utilization. Over-provisioned\nrequests are one of the largest sources of waste.\n\n-   **Use VPA in Recommendation Mode**: propose the VPA as a pull request through\n    `submit-suggestion`, wait 24+ hours for data collection, then read its recommendations.\n\n```yaml\napiVersion: autoscaling.k8s.io\u002Fv1\nkind: VerticalPodAutoscaler\nmetadata:\n  name: {deployment_name}-vpa\nspec:\n  targetRef:\n    apiVersion: apps\u002Fv1\n    kind: Deployment\n    name: {deployment_name}\n  updatePolicy:\n    updateMode: \"Off\"\n```\n\n```bash\nkubectl get vpa {deployment_name}-vpa -o jsonpath='{.status.recommendation}'\n```\n\n-   **Optimization Rules:**\n\nCondition                     | Action                             | Savings\n----------------------------- | ---------------------------------- | -------\nCPU request >5x P95 actual    | Reduce to `P95 * 1.2`              | High\nMemory request >3x P95 actual | Reduce to `P95 * 1.2`              | High\nCPU request >2x P95 actual    | Reduce to `P95 * 1.2`              | Medium\nNo resource requests set      | Add requests (enables bin-packing) | Medium\n\n-   **Use MPA**: Reconcile HPA and VPA recommendations when scaling both\n    horizontally and vertically to avoid conflicting scale events.\n-   **Review Cost Recommendations**: Check Google Cloud Console (`Cost\n    Management` > `GKE Cost Optimization`) for built-in rightsizing suggestions.\n\n### 4. Spot VMs via ComputeClasses & NodeSelector\n\nUse Spot VMs for fault-tolerant workloads to achieve 60-90% cost reduction.\n\n#### 4.1 ComputeClass Configuration\n\n```yaml\napiVersion: cloud.google.com\u002Fv1\nkind: ComputeClass\nmetadata:\n  name: spot-with-fallback\nspec:\n  activeMigration:\n    optimizeRulePriority: true\n  priorities:\n  - machineFamily: n4\n    spot: true\n  - machineFamily: n4\n    spot: false\n```\n\n#### 4.2 Direct Workload Spot Selection (`nodeSelector`)\n\nFor stateless or batch workloads in GKE Autopilot, target Spot capacity directly\nusing `nodeSelector`:\n\n> [!WARNING] **Preemption Warning**: Spot VMs are interruptible and can be\n> preempted at any time with a 30-second notice. Workloads must be\n> fault-tolerant and run with at least 2 replicas for high availability. Always\n> explicitly warn users about this preemption risk when recommending Spot VMs.\n\n```yaml\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: stateless-spot-app\nspec:\n  replicas: 2\n  template:\n    spec:\n      nodeSelector:\n        cloud.google.com\u002Fgke-provisioning: Spot\n      terminationGracePeriodSeconds: 25  # Must be \u003C 30s for Spot preemption handling\n      containers:\n      - name: app\n        image: {image_name}\n        lifecycle:\n          preStop:\n            exec:\n              command: [\"\u002Fbin\u002Fsh\", \"-c\", \"sleep 5\"]\n```\n\n**Spot-Suitable Workloads:**\n\nWorkload                          | Spot-Suitable?\n--------------------------------- | ---------------\nBatch \u002F data processing           | Yes\nDev \u002F test environments           | Yes\nStateless web\u002FAPI (replicas >= 2) | Yes (with PDBs)\nJobs with checkpointing           | Yes\nStateful workloads (databases)    | No\nSingle-replica critical services  | No\n\n### 5. Machine Type Selection\n\nWhen choosing node shapes or configuring ComputeClasses:\n\n| Family        | Use Case                                     | Relative Cost |\n| ------------- | -------------------------------------------- | ------------- |\n| e2            | General purpose, burstable                   | Lowest        |\n| t2a \u002F t2d     | Scale-out (Arm\u002FAMD), price-performance       | Low           |\n:               : optimized                                    :               :\n| n4a           | Axion Arm-based, general-purpose             | Low           |\n:               : price-performance                            :               :\n| n4 \u002F n4d      | General purpose (Intel\u002FAMD), flexible shapes | Low-Medium    |\n| c4a           | Compute-optimized (Arm), high efficiency     | Medium-High   |\n| c3 \u002F c4       | Compute-optimized (Intel)                    | Medium-High   |\n| c3d \u002F c4d     | Compute-optimized (AMD), high throughput     | Medium-High   |\n| ek-standard   | Autopilot enhanced (golden path)             | Medium        |\n| m3 \u002F x4       | Memory-optimized, SAP HANA, large databases  | High          |\n| g2 (L4 GPU)   | AI inference                                 | High          |\n| a3 (H100 GPU) | AI training                                  | Highest       |\n| a4 \u002F a4x      | Ultra-scale AI (Blackwell GPUs)              | Highest       |\n\n### 6. Committed Use Discounts (CUDs)\n\nFor steady-state workloads with predictable baseline usage, purchase 1-year or\n3-year CUDs:\n\n-   1-year: ~20-30% discount\n-   3-year: ~50-55% discount\n-   Applied automatically to matching usage across the region.\n-   Purchase via Google Cloud Console > Billing > Committed use discounts.\n\n### 7. Cluster Management & Multi-Tenancy\n\n-   **Stop\u002Fstart dev clusters**: Idle dev clusters cost money even with no\n    workloads due to control plane fees.\n-   **Right-size node pools (Standard)**: Use Cluster Autoscaler with\n    appropriate min\u002Fmax limits.\n-   **Multi-tenant consolidation**: Share a single cluster across multiple\n    engineering teams instead of maintaining per-team clusters, using Namespaces\n    and ResourceQuotas to isolate workloads.\n\n## Cost & Utilization Monitoring\n\nTo inspect live node\u002Fpod utilization (`kubectl top nodes\u002Fpods`), view cluster\ncost budgets (`gcloud billing budgets list`), or query detailed billing reports\nin BigQuery (`bq query`), refer to the **`gke-cost-analysis`** skill.\n\n## Dev\u002FTest Cost Savings\n\nFor non-production environments, the following golden path deviations provide\ncost efficiency without impacting production safety:\n\n| Setting                 | Production (Golden | Dev\u002FTest                      |\n:                         : Path)              :                               :\n| ----------------------- | ------------------ | ----------------------------- |\n| Cluster mode            | Autopilot          | Autopilot (cheaper with fewer |\n:                         :                    : pods)                         :\n| Release channel         | Regular            | Rapid (get fixes faster)      |\n| Private nodes           | Required           | Optional (simpler access)     |\n| Monitoring components   | Full suite         | `SYSTEM_COMPONENTS` only      |\n| Secret Manager rotation | 120s               | Disabled                      |\n| Maintenance windows     | Configured         | Not needed                    |\n\n## Best Practices Summary\n\n1.  **Enable Cost Allocation**: Always enable GKE cost allocation\n    (`--enable-cost-allocation`) to gain billing transparency across namespaces\n    and labels.\n2.  **Enforce Resource Quotas**: Restrict namespace CPU\u002Fmemory limits in\n    multi-tenant environments to prevent runaway costs or noisy neighbors.\n3.  **Rightsize Continuously**: Run VPA in recommendation mode (`updateMode:\n    Off`) and adjust requests to match `P95 * 1.2`.\n4.  **Leverage Spot VMs**: Use Spot VMs with `nodeSelector` or `ComputeClass`\n    for stateless, fault-tolerant workloads to save 60-90%.\n5.  **Optimize Autoscaling Profile**: Use `OPTIMIZE_UTILIZATION` for aggressive\n    node scale-down on idle compute.\n6.  **Consolidate & Clean Up**: Stop idle development clusters and consolidate\n    multi-team workloads into shared multi-tenant clusters.\n\n\u003C!-- kube-agents: local addition -->\n\n## On a kube-agents install\n\n- **No dollar figure without billing data.** Quote a cost, a dollar saving or a monthly total only\n  from the billing export (see the `gke-cost-analysis` skill). Without it, report waste in resource\n  units (vCPU, GiB, nodes, disks) and say that a price needs billing data. Never multiply list\n  prices into a fleet total. A published discount range (Spot, committed use) may be quoted as\n  Google's range, never as this fleet's saving.\n- **A cluster running kube-agents is not empty.** \"Stop idle dev clusters\" above applies only to a\n  cluster with no workload. System pods (`kube-system`, `gke-*`, `gmp-*`) are not workload. The\n  kube-agents operator, the agents and their sidecars are workload. Never recommend stopping or\n  deleting a cluster without naming the workloads you counted on it.\n- **Stay inside the install's scope.** Read `fleet_scope()` first, and leave out every cluster it\n  lists in `excluded_clusters` (#3081).\n- **GKE Autopilot Headroom Invariant.** `kube-system\u002Fgke-system-balloon-pod` pods and GKE system\n  reservation pods in `kube-system` or `gke-managed-*` hold low-priority spare scheduling headroom\n  that GKE preempts automatically when user workloads need capacity. Never report them as idle waste\n  or rightsizing candidates, never run per-pod `kubectl` queries or documentation\u002Fweb searches on\n  `balloon` pods, and scope workload optimization reads to non-system user namespaces (#3141).\n","# GKE Cost Optimization\n\nThis reference covers strategies and workflows for reducing Google Kubernetes\nEngine (GKE) costs while maintaining a secure and reliable posture.\n\n> **MCP Tools:** `get_k8s_resource`, `describe_k8s_resource`, `get_cluster`\n>\n> A change goes out as a pull request to the GitOps repository, never as a write from here: Kubernetes objects as YAML through `gke-manifest-generation`, cluster settings and other Google Cloud resources as Config Connector YAML through `gcp-config-connector`, opened with `submit-suggestion`. Each profile's config offers only the `gke` MCP server's read tools, and the broker refuses `kubectl` and `gcloud` writes.\n\n## Golden Path Cost Features\n\nThe golden path already includes cost-optimizing settings:\n\n| Setting                  | Value                  | Impact                  |\n| ------------------------ | ---------------------- | ----------------------- |\n| `autoscalingProfile`     | `OPTIMIZE_UTILIZATION` | Aggressive node         |\n:                          :                        : scale-down reduces idle :\n:                          :                        : compute                 :\n| `verticalPodAutoscaling` | `enabled`              | VPA recommendations     |\n:                          :                        : prevent                 :\n:                          :                        : over-provisioning       :\n| Autopilot pricing        | Pay per pod request    | No charge for unused    |\n:                          :                        : node capacity           :\n| Node Auto Provisioning   | enabled                | Right-sized node pools  |\n:                          :                        : created automatically   :\n\n## Workflows & Optimization Strategies\n\n### 1. Prerequisite: Cost Allocation & Monitoring\n\nTo enable GKE cost allocation (`--enable-cost-allocation`) for billing tracking\nacross namespaces and labels, inspect live cluster utilization (`kubectl top`),\nor run historical cost breakdown queries in BigQuery (`bq`), use the\n**`gke-cost-analysis`** skill. Once tracking is active and waste is diagnosed,\napply the optimization workflows below.\n\n### 2. Configure Resource Quotas\n\nResource quotas restrict total resource consumption across tenants in\nmulti-tenant clusters, preventing runaway costs. The quota is proposed as a pull request\nthrough `submit-suggestion`:\n\n```yaml\napiVersion: v1\nkind: ResourceQuota\nmetadata:\n  name: compute-quota\n  namespace: {namespace}\nspec:\n  hard:\n    requests.cpu: \"4\"\n    requests.memory: 16Gi\n    limits.cpu: \"8\"\n    limits.memory: 32Gi\n```\n\n### 3. Pod Rightsizing (VPA & MPA)\n\nAdjust pod resource requests to match actual utilization. Over-provisioned\nrequests are one of the largest sources of waste.\n\n-   **Use VPA in Recommendation Mode**: propose the VPA as a pull request through\n    `submit-suggestion`, wait 24+ hours for data collection, then read its recommendations.\n\n```yaml\napiVersion: autoscaling.k8s.io\u002Fv1\nkind: VerticalPodAutoscaler\nmetadata:\n  name: {deployment_name}-vpa\nspec:\n  targetRef:\n    apiVersion: apps\u002Fv1\n    kind: Deployment\n    name: {deployment_name}\n  updatePolicy:\n    updateMode: \"Off\"\n```\n\n```bash\nkubectl get vpa {deployment_name}-vpa -o jsonpath='{.status.recommendation}'\n```\n\n-   **Optimization Rules:**\n\nCondition                     | Action                             | Savings\n----------------------------- | ---------------------------------- | -------\nCPU request >5x P95 actual    | Reduce to `P95 * 1.2`              | High\nMemory request >3x P95 actual | Reduce to `P95 * 1.2`              | High\nCPU request >2x P95 actual    | Reduce to `P95 * 1.2`              | Medium\nNo resource requests set      | Add requests (enables bin-packing) | Medium\n\n-   **Use MPA**: Reconcile HPA and VPA recommendations when scaling both\n    horizontally and vertically to avoid conflicting scale events.\n-   **Review Cost Recommendations**: Check Google Cloud Console (`Cost\n    Management` > `GKE Cost Optimization`) for built-in rightsizing suggestions.\n\n### 4. Spot VMs via ComputeClasses & NodeSelector\n\nUse Spot VMs for fault-tolerant workloads to achieve 60-90% cost reduction.\n\n#### 4.1 ComputeClass Configuration\n\n```yaml\napiVersion: cloud.google.com\u002Fv1\nkind: ComputeClass\nmetadata:\n  name: spot-with-fallback\nspec:\n  activeMigration:\n    optimizeRulePriority: true\n  priorities:\n  - machineFamily: n4\n    spot: true\n  - machineFamily: n4\n    spot: false\n```\n\n#### 4.2 Direct Workload Spot Selection (`nodeSelector`)\n\nFor stateless or batch workloads in GKE Autopilot, target Spot capacity directly\nusing `nodeSelector`:\n\n> [!WARNING] **Preemption Warning**: Spot VMs are interruptible and can be\n> preempted at any time with a 30-second notice. Workloads must be\n> fault-tolerant and run with at least 2 replicas for high availability. Always\n> explicitly warn users about this preemption risk when recommending Spot VMs.\n\n```yaml\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: stateless-spot-app\nspec:\n  replicas: 2\n  template:\n    spec:\n      nodeSelector:\n        cloud.google.com\u002Fgke-provisioning: Spot\n      terminationGracePeriodSeconds: 25  # Must be \u003C 30s for Spot preemption handling\n      containers:\n      - name: app\n        image: {image_name}\n        lifecycle:\n          preStop:\n            exec:\n              command: [\"\u002Fbin\u002Fsh\", \"-c\", \"sleep 5\"]\n```\n\n**Spot-Suitable Workloads:**\n\nWorkload                          | Spot-Suitable?\n--------------------------------- | ---------------\nBatch \u002F data processing           | Yes\nDev \u002F test environments           | Yes\nStateless web\u002FAPI (replicas >= 2) | Yes (with PDBs)\nJobs with checkpointing           | Yes\nStateful workloads (databases)    | No\nSingle-replica critical services  | No\n\n### 5. Machine Type Selection\n\nWhen choosing node shapes or configuring ComputeClasses:\n\n| Family        | Use Case                                     | Relative Cost |\n| ------------- | -------------------------------------------- | ------------- |\n| e2            | General purpose, burstable                   | Lowest        |\n| t2a \u002F t2d     | Scale-out (Arm\u002FAMD), price-performance       | Low           |\n:               : optimized                                    :               :\n| n4a           | Axion Arm-based, general-purpose             | Low           |\n:               : price-performance                            :               :\n| n4 \u002F n4d      | General purpose (Intel\u002FAMD), flexible shapes | Low-Medium    |\n| c4a           | Compute-optimized (Arm), high efficiency     | Medium-High   |\n| c3 \u002F c4       | Compute-optimized (Intel)                    | Medium-High   |\n| c3d \u002F c4d     | Compute-optimized (AMD), high throughput     | Medium-High   |\n| ek-standard   | Autopilot enhanced (golden path)             | Medium        |\n| m3 \u002F x4       | Memory-optimized, SAP HANA, large databases  | High          |\n| g2 (L4 GPU)   | AI inference                                 | High          |\n| a3 (H100 GPU) | AI training                                  | Highest       |\n| a4 \u002F a4x      | Ultra-scale AI (Blackwell GPUs)              | Highest       |\n\n### 6. Committed Use Discounts (CUDs)\n\nFor steady-state workloads with predictable baseline usage, purchase 1-year or\n3-year CUDs:\n\n-   1-year: ~20-30% discount\n-   3-year: ~50-55% discount\n-   Applied automatically to matching usage across the region.\n-   Purchase via Google Cloud Console > Billing > Committed use discounts.\n\n### 7. Cluster Management & Multi-Tenancy\n\n-   **Stop\u002Fstart dev clusters**: Idle dev clusters cost money even with no\n    workloads due to control plane fees.\n-   **Right-size node pools (Standard)**: Use Cluster Autoscaler with\n    appropriate min\u002Fmax limits.\n-   **Multi-tenant consolidation**: Share a single cluster across multiple\n    engineering teams instead of maintaining per-team clusters, using Namespaces\n    and ResourceQuotas to isolate workloads.\n\n## Cost & Utilization Monitoring\n\nTo inspect live node\u002Fpod utilization (`kubectl top nodes\u002Fpods`), view cluster\ncost budgets (`gcloud billing budgets list`), or query detailed billing reports\nin BigQuery (`bq query`), refer to the **`gke-cost-analysis`** skill.\n\n## Dev\u002FTest Cost Savings\n\nFor non-production environments, the following golden path deviations provide\ncost efficiency without impacting production safety:\n\n| Setting                 | Production (Golden | Dev\u002FTest                      |\n:                         : Path)              :                               :\n| ----------------------- | ------------------ | ----------------------------- |\n| Cluster mode            | Autopilot          | Autopilot (cheaper with fewer |\n:                         :                    : pods)                         :\n| Release channel         | Regular            | Rapid (get fixes faster)      |\n| Private nodes           | Required           | Optional (simpler access)     |\n| Monitoring components   | Full suite         | `SYSTEM_COMPONENTS` only      |\n| Secret Manager rotation | 120s               | Disabled                      |\n| Maintenance windows     | Configured         | Not needed                    |\n\n## Best Practices Summary\n\n1.  **Enable Cost Allocation**: Always enable GKE cost allocation\n    (`--enable-cost-allocation`) to gain billing transparency across namespaces\n    and labels.\n2.  **Enforce Resource Quotas**: Restrict namespace CPU\u002Fmemory limits in\n    multi-tenant environments to prevent runaway costs or noisy neighbors.\n3.  **Rightsize Continuously**: Run VPA in recommendation mode (`updateMode:\n    Off`) and adjust requests to match `P95 * 1.2`.\n4.  **Leverage Spot VMs**: Use Spot VMs with `nodeSelector` or `ComputeClass`\n    for stateless, fault-tolerant workloads to save 60-90%.\n5.  **Optimize Autoscaling Profile**: Use `OPTIMIZE_UTILIZATION` for aggressive\n    node scale-down on idle compute.\n6.  **Consolidate & Clean Up**: Stop idle development clusters and consolidate\n    multi-team workloads into shared multi-tenant clusters.\n\n\u003C!-- kube-agents: local addition -->\n\n## On a kube-agents install\n\n- **No dollar figure without billing data.** Quote a cost, a dollar saving or a monthly total only\n  from the billing export (see the `gke-cost-analysis` skill). Without it, report waste in resource\n  units (vCPU, GiB, nodes, disks) and say that a price needs billing data. Never multiply list\n  prices into a fleet total. A published discount range (Spot, committed use) may be quoted as\n  Google's range, never as this fleet's saving.\n- **A cluster running kube-agents is not empty.** \"Stop idle dev clusters\" above applies only to a\n  cluster with no workload. System pods (`kube-system`, `gke-*`, `gmp-*`) are not workload. The\n  kube-agents operator, the agents and their sidecars are workload. Never recommend stopping or\n  deleting a cluster without naming the workloads you counted on it.\n- **Stay inside the install's scope.** Read `fleet_scope()` first, and leave out every cluster it\n  lists in `excluded_clusters` (#3081).\n- **GKE Autopilot Headroom Invariant.** `kube-system\u002Fgke-system-balloon-pod` pods and GKE system\n  reservation pods in `kube-system` or `gke-managed-*` hold low-priority spare scheduling headroom\n  that GKE preempts automatically when user workloads need capacity. Never report them as idle waste\n  or rightsizing candidates, never run per-pod `kubectl` queries or documentation\u002Fweb searches on\n  `balloon` pods, and scope workload optimization reads to non-system user namespaces (#3141).\n",{"name":5,"metadata":23,"description":7},{"category":24},"CloudObservabilityAndMonitoring","main","af354bf2b99e17df77e52c512a7ba968c37c2306","agents\u002Fplatform\u002Fskills\u002Fgke-cost-optimization",44,"https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents","https:\u002F\u002Fgke-labs.github.io\u002Fkube-agents\u002F","https:\u002F\u002Fgithub.com\u002Fgke-labs","2026-11-14 20:53:19",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add gke-labs\u002Fkube-agents --skill gke-cost-optimization",{"tool":39,"command":40},"bunx","bunx skills add gke-labs\u002Fkube-agents --skill gke-cost-optimization",{"tool":42,"command":43},"pnpm","pnpm dlx skills add gke-labs\u002Fkube-agents --skill gke-cost-optimization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fagents\u002Fplatform\u002Fskills\u002Fgke-cost-optimization\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":18},"01M72168JZM6CYRZFWW204PA2V","gke-workload-troubleshooting","Diagnoses GKE workload failures (CrashLoopBackOff, OOMKilled, ImagePullBackOff, Pending, etc.) via logs and events. Use when pods fail to start or crash repeatedly. Don't use for GKE cluster infrastructure provisioning, node pool creation, or non-Kubernetes Google Cloud services.","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fthird_party\u002Fgoogle-skills\u002Fgke-workload-troubleshooting\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":18},"01M721643JPG43MFDHGN067D7T","gke-workload-security","Audits, configures, and hardens workload-level security controls for Google Kubernetes Engine (GKE) applications and namespaces. Covers running security audits (`audit_cluster.sh`), enforcing Network Policies (default-deny and Dataplane V2 logging), isolating high-risk pods inside GKE Sandbox (`gVisor`), enforcing Pod Security Standards (`restricted` labeling) and pod securityContext, and mounting Secret Manager secrets via CSI (`SecretProviderClass`). Use when auditing workload security posture, isolating namespaces, applying pod security standards, or configuring network policies and secret volume mounts. Don't use for Workload Identity (use gke-workload-identity), cluster-wide control plane security, RBAC hardening, Binary Authorization, Shielded Nodes, or enabling platform-level GKE add-ons (use gke-platform-security instead).","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fthird_party\u002Fgoogle-skills\u002Fgke-workload-security\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":18},"01M721618QGFKZRWHS0RFVG7WT","gke-workload-scaling","Manages scaling for GKE workloads using HPA and VPA. Use when configuring Horizontal Pod Autoscaler (HPA), configuring Vertical Pod Autoscaler (VPA), or applying best practices for GKE workload autoscaling. Do not use for cluster-level autoscaling (Cluster Autoscaler), static cluster sizing, or configuring node-level machine styles directly.","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fthird_party\u002Fgoogle-skills\u002Fgke-workload-scaling\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":18},"01M7215WA1TNFDZE22VJEN3XXW","gke-workload-identity","Configures and diagnoses Workload Identity Federation for GKE authentication failures for Pods (403 \"iam.serviceAccounts.getAccessToken\" \u002F permission denied, \"could not find default credentials\", or GKE metadata server unreachable) by verifying cluster and node-pool Workload Identity configuration, the Kubernetes ServiceAccount (KSA) to IAM binding (direct principal binding and legacy Google ServiceAccount impersonation), target-resource IAM roles, and gke-metadata-server health. Use when setting up KSA\u002FGSA bindings (`roles\u002Fiam.workloadIdentityUser`, `iam.gke.io\u002Fgcp-service-account`) or when a Pod cannot authenticate to Google Cloud APIs. Don't use for in-cluster Kubernetes RBAC errors (API-server authorization), general workload crashes (use gke-workload-troubleshooting), or Pod Security Standards and NetworkPolicies (use gke-workload-security).","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fthird_party\u002Fgoogle-skills\u002Fgke-workload-identity\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":18},"01M7215PJTBTZ0W15ZZ2W32FF9","gke-upgrades","Plans, executes, and validates Google Kubernetes Engine (GKE) cluster upgrades and maintenance operations for both Standard and Autopilot clusters. Produces upgrade plans, pre\u002Fpost-upgrade checklists, maintenance runbooks with gcloud commands, release channel strategy, and troubleshooting guides. Handles node pool upgrade strategies (surge, blue-green), version compatibility, PDB management, and workload-specific concerns (stateful, GPU, operators). Use this skill whenever the user mentions GKE upgrades, Kubernetes version bumps, node pool maintenance, GKE patching, cluster version management, release channel selection, maintenance windows, surge upgrades, stuck upgrades, or any GKE lifecycle management task — even casual mentions like \"we need to upgrade our clusters\" or \"plan our next GKE maintenance\" or \"our upgrade is stuck.\" Don't use for GKE cluster creation, application onboarding, general networking\u002Frouting setup, or security policy configurations (use gke-basics or relevant GKE skills instead).","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fthird_party\u002Fgoogle-skills\u002Fgke-upgrades\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":18},"01M7215JX0FBZBTG4570CJ20HS","gke-tpu-metrics-monitoring","Monitors and troubleshoots GKE TPU workloads, nodes, and node pools using GKE system metrics and PromQL. Use when monitoring TensorCore duty cycle, TPU memory, node readiness, multi-host TPU node pool availability, host maintenance or preemption interruptions, and calculating MTTR or MTBI metrics for GKE TPUs. Don't use for general non-TPU GKE workload monitoring or non-metric TPU debugging.","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fthird_party\u002Fgoogle-skills\u002Fgke-tpu-metrics-monitoring\u002FSKILL.md",[],[]]