Skip to content

GKE Cost Analysis

Answer questions about Google Kubernetes Engine cluster costs using billing exports and live metrics

Repository
google/skills
Stars
21,782
Licence
Apache-2.0
Files
3 files

What it does

Once installed, the agent can answer questions like which namespace or workload is most expensive on Google Kubernetes Engine (GKE). It guides the agent to query your BigQuery billing export with bq, check whether GKE cost allocation labels are enabled, and compare live pod usage (kubectl top) against requested resources to find waste. It explains whether a cluster is billed per pod (Autopilot) or per VM node (Standard).

Great for

  • Platform or DevOps engineers who need to explain GKE spend to finance or management
  • Engineers investigating a sudden cost spike across namespaces or workloads
  • Teams that already export Google Cloud billing data to BigQuery

Skip it if

  • Applying cost fixes or rightsizing changes: the skill only analyses, and that work is handed to a separate gke-cost-optimization skill
  • Users without a BigQuery billing export set up, since the core analysis depends on it (the skill cannot create one)

Try asking

  • “What is my most expensive namespace on GKE over the last 30 days?”
  • “Break down GKE costs per workload for the prod-cluster in project my-proj”
  • “Why did my cluster cost spike last week? Compare requests against actual CPU use with kubectl top”
  • “Show my billing budgets for billing account 012345-ABCDEF”
Step-by-step guide: how to use GKE Cost AnalysisInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 3 original files, the Apache-2.0 licence and an attribution note.

    gke-cost-analysis.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip gke-cost-analysis.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip gke-cost-analysis.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Give the full BigQuery table path (project.dataset.table) and cluster name up front to avoid guesswork.
  • Enable GKE cost allocation early: labels only populate from that point on, with no historical backfill.
  • Review each bq and gcloud command before the agent runs it, especially the cluster update, which requires your explicit confirmation.

What's inside

  • references/attribution.md
  • references/billing-queries.md
  • SKILL.md

Redistributed unmodified from google/skills under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.