Agent skill · data analytics · google

gke-cost-optimization

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/memory requests, or selecting Spot VMs and machine types. Don't use for general compute class provisioning or GPU Selection (use gke-compute-classes instead).

Why this skill is useful

Provides specific commands and workflows for optimizing GKE costs that the AI wouldn't reliably generate on its own.

What it needs

About 4k tokens when loaded. Last updated 2026-08-06. 15,831 stars on the source repository.

What this skill does

GKE Cost Optimization This reference covers strategies and workflows for reducing Google Kubernetes Engine (GKE) costs while maintaining a secure and reliable posture. Attribution MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read Usage Attribution. For commands executed directly in the terminal (never in generated scripts, Terraform, or user code), prefix gcloud with CLOUDSDKMETRICSREQUESTATTRIBUTION="agent-skills/1.0 (skill:gke-cost-optimization)" and append agent-skills/1.0 (skill:gke-cost-optimization) to User-Agent headers. Workflows & Optimization Strategies 1. Prerequisite: Cost Allocation & Monitoring To enable GKE cost allocation (--enable-cost-allocation) for billing tracking across namespaces and labels, inspect live cluster utilization (kubectl top), or run historical cost breakdown queries in BigQuery (bq), use the gke-cost-analysis skill. Once tracking is active and waste is diagnosed, apply the optimization workflows below. 2. Configure Resource Quotas Resource quotas restrict total resource consumption across tenants in multi-tenant clusters, preventing runaway costs. Template: assets/resource-quota-example.yaml (set namespace + hard limits, then kubectl apply -f). 3. Pod Rightsizing (VPA & MPA) Adjust pod resource requests to match actual utilization. Over-provisioned requests are one of the largest sources of waste. Use VPA in Recommendation Mode (updateMode: "Off" — recommends without evicting): Optimization Rules: Condition Action Savings ----------------------------- ---------------------------------- ------- CPU request >5x P95 actual Reduce to P95 1.2 High Memory request >3x P95 actual Reduce to P95 1.2 High CPU request >2x P95 actual Reduce to P95 1.2 Medium No resource requests set Add requests (enables bin-packing) Medium Use MPA: Reconcile HPA and VPA recommendations when scaling both horizontally and vertically to avoid conflicting scale events. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills google/gke-cost-optimization

View the source on GitHub

Browse the @skills marketplace