मुख्य सामग्री पर जाएँ
Skillpedia
डिप्लॉय और क्लाउड (DevOps)22k · #10302

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 पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/google/skills/blob/main/skills/cloud/gke-workload-scaling-troubleshooting/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

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-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 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

  1. Parameter Extraction: Extract required context (project_id, cluster_name, cluster_location, hpa_name, workload_name, workload_namespace) non-interactively from the user prompt, active SETTINGS.md, or environment defaults:

    • Default workload_namespace 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 {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 / gcloud diagnostic commands for the human operator to run.
      • Synthesize the root-cause analysis and output the proposed GitOps correction based on the reported symptoms.

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, or multiple services selecting the same target → Branch B (Workload & Service Errors).
  • <unknown> custom/external metric, FailedGetExternalMetric / FailedGetCustomMetric, or no 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: 0 won'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

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

finding-google-skills

22k

आपके एजेंट को किसी सेटअप काम के लिए सही Google गाइड खोजने में मदद करती है, जैसे hosting, databases, storage, sign-in या AI model serving।

AI और एजेंटएजेंट

gcloud

22k

यह आपके एजेंट को Google Cloud gcloud कमांड लिखने और जाँचने में मदद करती है, कुछ भी चलाने से पहले सटीक सिंटैक्स देखकर, ताकि फ़्लैग का अंदाज़ा न लगे।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

google-cloud-recipe-auth

22k

आपके एजेंट को Google Cloud की पहचान और पहुँच समझाती है, जिसमें यह शामिल है कि लोग और सेवाएँ कैसे साइन इन करते हैं और उन्हें कौन सी अनुमतियाँ मिलती हैं।

कोडिंगसिक्योरिटी

google-cloud-recipe-onboarding

22k

एक नए डेवलपर को Google Cloud पर पहले कदमों में मदद करती है, जिसमें प्रोजेक्ट चुनना, बिलिंग जोड़ना और पहला संसाधन डिप्लॉय करना शामिल है।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

मिलती-जुलती skills