gke-workload-scaling-troubleshooting
यह क्या करती है
यह स्किल पता लगाती है कि GKE HorizontalPodAutoscaler वैसा scale क्यों नहीं कर रहा जैसा उसे करना चाहिए। यह उन टीमों के लिए है जिनका autoscaling रुक गया है या लोड पर प्रतिक्रिया नहीं देता।
कब इस्तेमाल करें
- ✓जब HPA metrics को unknown दिखाए या FailedGetResourceMetric events लॉग करे।
- ✓जब HPA ऊपर या नीचे scale न हो, या शून्य तक और शून्य से scale न हो।
- ✓जब autoscaling के लिए इस्तेमाल हो रहा custom या external metric काम करना बंद कर दे।
Skill का लिंक
https://github.com/google/skills/blob/main/skills/cloud/gke-workload-scaling-troubleshooting/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरा GKE autoscaler CPU को unknown दिखाता है और कभी pods नहीं जोड़ता। पता कीजिए क्यों।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह workload, HPA और cluster का विवरण जुटाती है, फिर events, resource requests और metrics pipeline जाँचती है। यह कारण बताती है और सुधार manifest या config बदलावों के रूप में प्रस्तावित करती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
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-scalingskill 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
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="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
Parameter Extraction: Extract required context (
project_id,cluster_name,cluster_location,hpa_name,workload_name,workload_namespace) non-interactively from the user prompt, activeSETTINGS.md, or environment defaults:- Default
workload_namespacetodefaultif omitted. - Infer missing cluster parameters from the active environment (
kubectl config current-contextorgcloud config get-value project).
- Default
Cluster Credentials & Fallback Mode:
- Attempt credential fetch:
gcloud container clusters get-credentials {cluster_name} --location {cluster_location} --project {project_id}. - 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.
- Immediately present the exact
kubectl/gclouddiagnostic commands for the human operator to run. - Synthesize the root-cause analysis and output the proposed GitOps correction based on the reported symptoms.
- Attempt credential fetch:
Step 1: Inspect the HPA and Classify the Symptom
Start every investigation with kubectl describe hpa, then route to the matching
branch. The three key sections are Metrics (an <unknown> value means the
HPA hasn't fetched the metric or the pipeline is broken), Conditions
(AbleToScale, ScalingActive, ScalingLimited — a False status marks a
failure), and Events (specific reasons such as FailedGetScale or
FailedGetResourceMetric).
Diagnostic Commands:
kubectl describe hpa {hpa_name} -n {workload_namespace}
kubectl get hpa {hpa_name} -n {workload_namespace} -o yaml
For historical events, query Cloud Logging (the HPA events survive after the live
Events list rolls over):
resource.type="k8s_cluster"
resource.labels.cluster_name="{cluster_name}"
resource.labels.location="{cluster_location}"
logName="projects/{project_id}/logs/events"
jsonPayload.involvedObject.kind="HorizontalPodAutoscaler"
Route by signal:
FailedGetScale,FailedComputeMetricsReplicas,Error 400 ... label is not allowed, or fluctuating replicas from competing HPAs → Branch A (Configuration Errors).FailedGetResourceMetric,unable to fetch pod metrics, ormultiple services selecting the same target→ Branch B (Workload & Service Errors).<unknown>custom/external metric,FailedGetExternalMetric/FailedGetCustomMetric, orno known available metric versions found→ Branch C (Metrics API & Data Availability).- Conditions all
True/ no errors but the workload won't scale up or down → Branch D (Healthy but Unexpected Scaling). - Workload configured with
minReplicas: 0won't scale to or from zero → Branch E (Scale To / From Zero). - Correct HPA but slow reaction on a cluster with many HPA objects → Branch F (Slow Recalculation on Large Cluster
अक्सर पूछे जाने वाले सवाल
क्या यह मेरा autoscaler बदलती है?
नहीं। निदान केवल पढ़ने वाला है, और बदलाव सुझाए जाते हैं ताकि आप उन्हें लागू करें।
यह कौन से events जाँचती है?
FailedGetResourceMetric, FailedGetScale और FailedComputeMetricsReplicas जैसे events।
क्या यह शुरुआत से autoscaling सेट करती है?
नहीं। HPA और VPA कॉन्फ़िगर करना gke-workload-scaling स्किल संभालती है।
जानकारी
लेखक का मूल विवरण
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 e
repo: google/skills
लोकप्रियता
- GitHub स्टार
- 22k
- रैंकिंग में स्थान
- #10302
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
finding-google-skills
22kआपके एजेंट को किसी सेटअप काम के लिए सही Google गाइड खोजने में मदद करती है, जैसे hosting, databases, storage, sign-in या AI model serving।
gcloud
22kयह आपके एजेंट को Google Cloud gcloud कमांड लिखने और जाँचने में मदद करती है, कुछ भी चलाने से पहले सटीक सिंटैक्स देखकर, ताकि फ़्लैग का अंदाज़ा न लगे।
google-cloud-recipe-auth
22kआपके एजेंट को Google Cloud की पहचान और पहुँच समझाती है, जिसमें यह शामिल है कि लोग और सेवाएँ कैसे साइन इन करते हैं और उन्हें कौन सी अनुमतियाँ मिलती हैं।
google-cloud-recipe-onboarding
22kएक नए डेवलपर को Google Cloud पर पहले कदमों में मदद करती है, जिसमें प्रोजेक्ट चुनना, बिलिंग जोड़ना और पहला संसाधन डिप्लॉय करना शामिल है।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।