skills/gke-cost-optimization/SKILL.md
Guidance on optimizing costs for Google Kubernetes Engine (GKE) clusters.
npx skillsauth add googlecloudplatform/gke-mcp gke-cost-optimizationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides guidance on optimizing costs for Google Kubernetes Engine (GKE) clusters.
Cost optimization in GKE involves tracking costs, setting limits to prevent waste, and rightsizing workloads to match actual usage.
GKE cost allocation allows you to see the cost of your GKE resources in Cloud Billing, broken down by namespace and cluster labels.
Steps:
Command:
gcloud container clusters update <cluster-name> \
--enable-cost-allocation \
--region <region>
Resource quotas restrict the total resource consumption in a namespace, preventing any single tenant from consuming all cluster resources.
Example ResourceQuota Manifest:
apiVersion: v1
kind: ResourceQuota
metadata:
name: compute-quota
namespace: my-namespace
spec:
hard:
requests.cpu: "4"
requests.memory: 16Gi
limits.cpu: "8"
limits.memory: 32Gi
Rightsizing involves adjusting the requested resources of your workloads to match their actual utilization.
data-ai
Systematically diagnose GKE JobSet interruptions, restarts, and preemptions for AI/ML training workloads. Identifies preemption events, maintenance interruptions, bad host VMs, unhealthy pods, and coordinator worker failures.
development
Diagnose and prevent `vbar_control_agent` segfaults and OOMs caused by race conditions during TPU device resets and frequent metrics collection (e.g. every 3s). Use when TPU slice initialization fails or `vbar_control_agent` crashes on TPU v6e nodes.
development
Expert instructions for building high-quality GKE troubleshooting skills. Codifies Step 0 context rules, zero-hallucination signatures, and explicit LQL/PromQL query requirements.
tools
Assists in preparing applications and clusters on GKE for production.