Langsung ke konten
Skillpedia
Deploy & cloud (DevOps)22k ยท #10305

gke-workload-troubleshooting

Fungsinya

Skill ini mencari tahu mengapa aplikasi di dalam pod Google Kubernetes Engine gagal. Skill ini ditujukan untuk developer yang pod-nya crash, restart, atau tidak pernah mulai.

Kapan dipakai

  • โœ“Saat pod terus crash atau masuk ke CrashLoopBackOff di GKE.
  • โœ“Saat pod macet dalam status Pending atau ImagePullBackOff dan tidak mau mulai.
  • โœ“Saat pod dihentikan karena kehabisan memori di GKE.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/google/skills/blob/main/skills/cloud/gke-workload-troubleshooting/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œPod GKE saya terus restart dengan CrashLoopBackOff. Periksa log dan event-nya dan beri tahu saya apa yang salah.โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill ini membaca log dan event beban kerja dalam jendela waktu tertentu, menentukan penyebab yang paling mungkin, dan mengusulkan perbaikan. Skill ini tidak mengubah apa pun secara langsung, sehingga Anda sendiri yang menerapkan patch yang diusulkan.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum

Apakah skill ini memperbaiki cluster saya?

Tidak. Skill ini mengusulkan perbaikan manifes atau Google Cloud dan membiarkan perubahan itu kepada Anda.

Bagaimana jika saya tidak menyebutkan namespace?

Skill ini menggunakan namespace default.

Apakah mencakup pembuatan cluster?

Tidak. Infrastruktur cluster dan pembuatan node pool berada di luar cakupannya.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
22k
Peringkat
#10305
Lisensi
Apache-2.0
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa