본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)22k · #10305

gke-workload-troubleshooting

하는 일

이 스킬은 Google Kubernetes Engine 파드의 앱이 실패하는 이유를 찾습니다. 파드가 충돌하거나, 재시작하거나, 아예 시작되지 않는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓GKE에서 파드가 계속 충돌하거나 CrashLoopBackOff 상태가 될 때.
  • ✓파드가 Pending이나 ImagePullBackOff에 멈춰 시작되지 않을 때.
  • ✓GKE에서 파드가 메모리 부족으로 종료되었을 때.

스킬 링크

https://github.com/google/skills/blob/main/skills/cloud/gke-workload-troubleshooting/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/google/skills/blob/main/skills/cloud/gke-workload-troubleshooting/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“GKE 파드가 CrashLoopBackOff로 계속 재시작합니다. 로그와 이벤트를 확인하고 무엇이 잘못되었는지 알려 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

지정한 시간 범위 안의 워크로드 로그와 이벤트를 읽고, 가장 가능성 높은 원인을 찾아 수정안을 제안합니다. 실시간 리소스는 바꾸지 않으므로 제안된 패치는 직접 적용해야 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

GKE Workload Troubleshooting Skill

Use this skill to systematically diagnose and resolve failures in application workloads deployed in GKE clusters. This skill operates non-interactively and enforces a read-only diagnostics boundary: it only proposes fixes — whether Kubernetes manifest/config patches or Google Cloud changes (for example gcloud IAM bindings or node-pool recreation) — and never executes live mutations itself.

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-troubleshooting)" and append agent-skills/1.0 (skill:gke-workload-troubleshooting) to User-Agent headers.

🔍 Diagnostic Workflow

Step 0: Non-Interactive Context Discovery & Time Window Definition

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

    • Default workload_namespace to default if omitted.
    • Infer missing cluster parameters from active environment (kubectl config current-context or gcloud config get-value project).
    • Prioritize non-interactive context discovery from prompts and environment defaults to ensure autonomous execution flow.
  2. Cluster Credentials & Fallback Mode:

    • Attempt credential fetch: gcloud container clusters get-credentials {cluster_name} --region/--zone {cluster_location}
    • 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 in unreachable cluster scenarios.
      • Immediately present the exact sequence of kubectl diagnostic commands for the human operator to run.
      • Synthesize the root cause analysis and output the proposed GitOps manifest fix based on the reported symptoms.
  3. Time Handling & Fallbacks:

    • Determine Issue Timestamp ({issue_time}):
      • Specific Time Provided: If the user provides a specific timestamp, use it as {issue_time}.
      • Relative Time Provided (e.g., "5 minutes ago"): Dynamically calculate the corresponding UTC timestamp based on current system time, and use it as {issue_time}.
      • No Time Provided (Default): Use current system time as {issue_time}.
    • Window Calculation: Center a 1-hour query window around {issue_time} (start_time = {issue_time} - 30m, end_time = {issue_time} + 30m).

Step 1: Analyze Pod Status and Conditions

Inspect the workload's active pod states and controller status.

Diagnostic Commands:

# 1. Inspect the deployment's actual selector labels:
kubectl get deployment {workload_name} -n {workload_namespace} -o jsonpath='{.spec.selector.matchLabels}'
# 2. Query the pods using the returned labels, for example:
kubectl get pods -l {selector_labels} -n {workload_namespace}
kubectl get deploy/{workload_name} -n {workload_namespace} -o yaml

Diagnostic Decision Tree:

  • Phase: Pending:

    • The Pod cannot schedule on any node. Proceed directly to Step 2 (Query Namespace Events).
  • State: CrashLoopBackOff / Error:

    • The container boots but exits repeatedly; the kubelet restarts it with an increasing back-off delay of up to five minutes. First read the terminated reason and exit code:
    kubectl describe pod {pod_name} -n {workload_namespace}
    kubectl get pod {pod_name} -n {workload_namespace} -o jsonpath='{.status.containerStatuses[*].lastState.terminated}'
    
    • Reason: OOMKilled (Exit Code 137): The container's memory limit was reached. Proceed to Step 3 (Inspect Logs) → OOM Analysis to classify container-level vs node-level, then Step 5 to propose fixes.
    • **Ex
자주 묻는 질문

클러스터를 대신 고쳐 주나요?

아닙니다. 매니페스트나 Google Cloud 수정안을 제안하며, 변경은 사용자가 합니다.

네임스페이스를 지정하지 않으면 어떻게 하나요?

기본 네임스페이스인 default를 사용합니다.

클러스터 생성도 다루나요?

아닙니다. 클러스터 인프라와 노드 풀 생성은 범위 밖입니다.

상세 정보

작성자의 원본 설명

Diagnoses GKE workload failures (CrashLoopBackOff, OOMKilled, ImagePullBackOff, Pending, etc.) via logs and events. Use when pods fail to start or crash repeatedly. Don't use for GKE cluster infrastructure provisioning, node pool creation, or non-Kubernetes Google Cloud services.

repo: google/skills

인기도

GitHub 스타
22k
순위
#10305
라이선스
Apache-2.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬