gke-cost-optimization

Optimizes GKE costs through rightsizing, Spot VMs, CUDs, and resource quotas.

Updated May 11, 2026
One-click install
npx skills add https://github.com/alon3153/upe-social-publisher --skill gke-cost-optimization-alon3153
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gke-cost-optimization
Source: https://github.com/alon3153/upe-social-publisher/tree/main/.agents/skills/gke-cost-optimization
Command: npx skills add https://github.com/alon3153/upe-social-publisher --skill gke-cost-optimization-alon3153

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve? GKE clusters often waste money through over-provisioned resource requests, idle node pools, and missing discount commitments. This Skill provides concrete workflows to diagnose and reduce Google Kubernetes Engine spending while keeping workloads reliable. ## Core Features & Use Cases - Pod Rightsizing: Deploy VPA in recommendation mode and apply P95-based rules to cut oversized CPU and memory requests. - Spot VM Workloads: Target Spot capacity with nodeSelector for fault-tolerant batch and stateless workloads, achieving 60-90% savings. - Committed Use Discounts: Size 1-year or 3-year CUDs to the steady-state baseline only, covering bursts with autoscaling and Spot. - Use Case: A platform team notices a multi-tenant cluster's bill climbing. They apply ResourceQuotas per namespace, rightsize deployments using VPA recommendations, migrate batch jobs to Spot VMs, and purchase resource-based CUDs for the baseline load. ## Quick Start Ask the AI to analyze my GKE workloads and recommend cost optimizations including rightsizing, Spot VMs, and committed use discounts.

Frequently Asked Questions about gke-cost-optimization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce GKE cluster costs?▼

Start by enabling cost allocation to find waste, then rightsize pod requests using VPA recommendations, move fault-tolerant workloads to Spot VMs, and purchase committed use discounts sized to your steady-state baseline. Scale idle dev cluster node pools to zero.

How to use Spot VMs in GKE Autopilot?▼

Add nodeSelector with cloud.google.com/gke-spot set to true on your Deployment. Spot VMs are preemptible with about 30 seconds notice, so run at least 2 replicas, set terminationGracePeriodSeconds to 25, and add a preStop hook for graceful shutdown.

Which workloads are suitable for GKE Spot VMs?▼

Batch processing, dev/test environments, stateless web services with 2+ replicas, and jobs with checkpointing work well on Spot. Stateful workloads like databases and single-replica critical services should not use Spot due to preemption risk.

Should I buy resource-based or flexible CUDs for GKE?▼

Resource-based CUDs give deeper discounts (~55% for 3-year) but lock you to a machine family and region. Flexible CUDs offer lower discounts (~46% for 3-year) with portability. Commit only to your measured baseline usage, never peak.

Why is my GKE bill high despite low utilization?▼

Over-provisioned CPU and memory requests are the most common cause. Deploy VPA in recommendation mode (updateMode Off), wait 24 hours, then compare requests against P95 actual usage and reduce requests exceeding 2-5x actual consumption.