gke-workload-scaling

Configures HPA and VPA autoscaling for GKE workloads using kubectl and YAML manifests.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve? Scaling Kubernetes workloads correctly on Google Kubernetes Engine requires choosing between manual scaling, Horizontal Pod Autoscaling, and Vertical Pod Autoscaling, each with its own prerequisites, metric conflicts, and operational risks. This Skill provides the commands, manifest templates, and best practices to configure workload autoscaling without thrashing or downtime. ## Core Features & Use Cases - Manual and HPA Scaling: Scale deployments to fixed replica counts or configure HPA on CPU, memory, and external metrics such as Pub/Sub queue length via Cloud Monitoring. - VPA Configuration and Rightsizing: Enable VPA on Standard clusters, choose update modes (Off, Initial, Auto, InPlaceOrRecreate), and follow a rightsizing workflow that applies recommendations with a 20% buffer. - Use Case: A deployment is over-provisioned with CPU requests 5x above actual P95 usage. Deploy VPA in Off mode for 24 hours, read the target recommendations, and apply new requests at target times 1.2 to cut costs safely. ## Quick Start Ask the assistant to create an HPA manifest for your GKE deployment targeting 50% CPU utilization with 1 to 10 replicas.

Frequently Asked Questions about gke-workload-scaling

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

FAQPage Schema
How do I set up HPA on a GKE deployment?

Use kubectl autoscale with a CPU percentage target and min/max replicas, or apply an autoscaling/v2 YAML manifest for version-controlled configuration. Metrics Server must be running, which is enabled by default on GKE, and containers must define resource requests.

How do I enable Vertical Pod Autoscaler on GKE?

On Autopilot clusters VPA is enabled by default. On Standard clusters, run gcloud container clusters update with the --enable-vertical-pod-autoscaling flag, then apply a VerticalPodAutoscaler manifest with your chosen update mode.

Can I use HPA and VPA together on the same workload?

Yes, but do not configure both on the same metric, as this causes thrashing. A typical pattern is HPA scaling on CPU while VPA adjusts memory requests.

How do I scale GKE pods based on Pub/Sub queue length?

Use the External metric type in your HPA manifest, which is natively supported by the GKE control plane for Cloud Monitoring metrics without requiring the Custom Metrics Adapter.

Why does VPA not restart my single-replica pod in Auto mode?

By default VPA requires at least 2 replicas to perform evictions, preventing downtime of the only running replica. On GKE 1.22 and later, you can override this by setting minReplicas in PodUpdatePolicy.

When should I not use this workload scaling approach?

This Skill does not cover cluster-level autoscaling with Cluster Autoscaler, static cluster sizing, or node-level machine configuration. Use it only for pod-level scaling of deployments via HPA, VPA, or manual replica counts.