Agent skill · google

gke-workload-scaling-troubleshooting

Diagnoses GKE HorizontalPodAutoscaler (HPA) failures — metrics showing as <unknown>, FailedGetResourceMetric / FailedGetScale / FailedComputeMetricsReplicas events, missing Pod resource requests, custom/external metrics-pipeline breakage (FailedGetExternalMetric / FailedGetCustomMetric, unavailable metrics adapter, control-plane firewall blocking the adapter), HPA that won't scale up or down (tolerance / stabilization window / unavailable rate metrics), scale-to/from-zero problems, and slow HPA reaction on large clusters. Use when an HPA isn't scaling a workload as expected or reports metric errors. Don't use for configuring or authoring new HPA/VPA objects or scaling best practices (see the gke-workload-scaling skill), or for Cluster Autoscaler / node-pool sizing.

What it needs

About 9k tokens when loaded.

What this skill does

GKE Workload Scaling Troubleshooting Skill Use this skill to systematically diagnose and resolve HorizontalPodAutoscaler (HPA) failures on GKE — metrics reported as <unknown>, FailedGet events, missing resource requests, custom/external metrics-pipeline breakage, HPA that refuses to scale up or down, scale-to/from-zero issues, and slow HPA reaction on large clusters. This skill operates non-interactively and enforces a read-only diagnostics boundary before proposing manifest or configuration corrections. For configuring HPA/VPA objects and scaling best practices, use the gke-workload-scaling skill instead. This skill focuses on failure diagnosis. 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-workload-scaling-troubleshooting)" and append agent-skills/1.0 (skill:gke-workload-scaling-troubleshooting) to User-Agent headers. 🔍 Diagnosis & Resolution Workflow Step 0: Non-Interactive Context Discovery & Dry-Run Fallback 1. Parameter Extraction: Extract required context (projectid, clustername, clusterlocation, hpaname, workloadname, workloadnamespace) non-interactively from the user prompt, active SETTINGS.md, or environment defaults: Default workloadnamespace to default if omitted. Infer missing cluster parameters from the active environment (kubectl config current-context or gcloud config get-value project). 2. Cluster Credentials & Fallback Mode: Attempt credential fetch: gcloud container clusters get-credentials {clustername} --location {clusterlocation} --project {projectid}. Fallback / Dry-Run Mode: If the cluster is unreachable, non-existent, or live command execution fails (such as in sandboxed evaluations, dry-run mode, or offline analysis): Limit retry attempts to avoid resource exhaustion and context overflow. …

How to use it

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

@skills google/gke-workload-scaling-troubleshooting

View the source on GitHub

Browse the @skills marketplace