gke-workload-troubleshooting
Diagnoses GKE workload failures (CrashLoopBackOff, OOMKilled, ImagePullBackOff, Pending, etc.) via logs and events
Install / Use
npx skills add google/skills --skill gke-workload-troubleshootingInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
OperationsSupported Platforms
Our assessment of gke-workload-troubleshooting
gke-workload-troubleshooting scores 95/100 on our quality scale, 50th of 277 Operations skills we index (top 19%).
Its SKILL.md is 18 KB long, well organised into 21 sections with 4 code examples: a thorough specification that gives an agent plenty to work with.
With 20,340 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 2 days ago, so gke-workload-troubleshooting is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
gke-workload-troubleshooting compared with similar skills
All 4 of these similar skills score higher than gke-workload-troubleshooting; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| gke-workload-troubleshooting (this skill)by google | 95 | 20.3k | 2d ago | SKILL.md |
| LocalAIby mudler | 100 | 49.3k | today | MCP Server |
| algorithmic-artby anthropics | 100 | 177.9k | 3d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 3d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 5d ago | SKILL.md |
Frequently asked questions
- How do I install gke-workload-troubleshooting?
- Run
npx skills add google/skills --skill gke-workload-troubleshooting. The install tabs above show the steps for each supported agent. - Which AI agents does gke-workload-troubleshooting work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is gke-workload-troubleshooting safe to use?
- It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is gke-workload-troubleshooting still maintained?
- The repository was last updated 2 days ago, so gke-workload-troubleshooting is actively maintained.
Skill content
View source on GitHubname: gke-workload-troubleshooting metadata: version: "1.0.0" category: Containers description: >- 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.
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.
🔍 Diagnostic Workflow
Step 0: Non-Interactive Context Discovery & Time Window Definition
-
Parameter Extraction: Extract required context (
project_id,cluster_name,cluster_location,workload_name,workload_namespace) non-interactively from the user prompt, activeSETTINGS.md, or active environment defaults:- Default
workload_namespacetodefaultif omitted. - Infer missing cluster parameters from active environment (
kubectl config current-contextorgcloud config get-value project). - Prioritize non-interactive context discovery from prompts and environment defaults to ensure autonomous execution flow.
- Default
-
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
kubectldiagnostic commands for the human operator to run. - Synthesize the root cause analysis and output the proposed GitOps manifest fix based on the reported symptoms.
- Attempt credential fetch:
-
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}.
- Specific Time Provided: If the user provides a specific
timestamp, use it as
- Window Calculation: Center a 1-hour query window around
{issue_time}(start_time={issue_time} - 30m,end_time={issue_time} + 30m).
- Determine Issue Timestamp ({issue_time}):
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
kubeletrestarts 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.
- Exit Code 0 (successful exit): Unexpected for a long-running
Deployment/StatefulSet —
restartPolicy: Alwaysrestarts the finished process, creating the loop. Common causes: thecommand/entrypointdoes not start a persistent process, a worker exits on an empty queue, or a missing/invalid config (e.g., an unattached or mis-keyedConfigMapvolume) makes the app exit cleanly. Proceed to Step 3 (Inspect Logs). - Exit Code 128: Invalid
command/entrypoint— the executable path is wrong or absent in the image. Verify the container command in the manifest. - Exit Code 1 or other non-zero: The application crashed —
configuration errors, missing/invalid env vars or config files,
unreachable dependencies, or auth failures (
401/403) on Google Cloud calls (check the Pod's IAM / Workload Identity Federation). Proceed directly to Step 3 (Inspect Logs). - If the exit code looks healthy but the container keeps restarting, suspect a liveness probe failure (see Step 3).
- The container boots but exits repeatedly; the
-
State: ImagePullBackOff / ErrImagePull:
- The kubelet cannot pull the container image.
ImagePullBackOffmeans it keeps retrying with back-off;ErrImagePullis a general, non-recoverable pull error. Related statuses:InvalidImageName,RegistryUnavailable,SignatureValidationFailed,ImageInspectError. Proceed to Step 2 (Query Namespace Events) to read the exact pull error message.
- The kubelet cannot pull the container image.
-
State: ContainerCreating:
- The container is blocked during volume mount, networking setup, or image pulling. Proceed directly to Step 2 (Query Namespace Events).
Step 2: Query Namespace Events
Look for infrastructure, volume, image, or scheduling alerts in GKE.
Diagnostic Command:
kubectl get events -n {workload_namespace} --sort-by='.metadata.creationTimestamp'
# Or query Cloud Logging for historical GKE events within the time window:
gcloud logging read "resource.type=\"k8s_cluster\" AND logName=\"projects/{project_id}/logs/events\" AND jsonPayload.involvedObject.namespace=\"{workload_namespace}\"" --start-time="{start_time}" --end-time="{end_time}" --project="{project_id}"
# Or query specifically for image pull failures within the time window:
gcloud logging read 'log_id("events") AND resource.type="k8s_pod" AND resource.labels.cluster_name="{cluster_name}" AND jsonPayload.message=~"Failed to pull image"' --project="{project_id}"
Note: Retrieve the sorted events list and manually inspect the event timestamps
(CreationTimestamp/LastSeen) to identify failures occurring within the
{start_time} and {end_time} window.
Signature Identifiers:
-
FailedScheduling: Node resource exhaustion. Look for messages like0/3 nodes are available: 3 Insufficient memory.or missing node affinity tolerations (e.g. Spot VM taints). -
FailedMount:- Missing PersistentVolumeClaim (
PVC). - Missing Secret (
Secret "{secret_name}" not found). - Missing ConfigMap (
ConfigMap "{configmap_name}" not found).
- Missing PersistentVolumeClaim (
-
Failed/BackOff(Image Pull): First read the exact event message (Failed to pull image "IMAGE": ...) and triage by what it actually says. Do not jump to IAM / node service-account investigation unless the message is genuinely a permission or authentication error.-
Wrong image name/tag — start here (
not found,manifest unknown,InvalidImageName): the most common cause — the tag or path is wrong, or the image was deleted, frequently introduced by a recent deployment change.- Identify the failing container image name and the invalid tag.
- Check the Git history for the last known working image tag:
git log -p -S "{image_name}" -- {manifest_file_path}(or rungit logon the folder containing manifests). - Propose reverting the image tag to the last working version (or correcting the tag) in the manifest patch.
-
Permission / authentication errors only (the message contains
403 Forbidden/denied, or401 Unauthorized/unauthorized): the node cannot authorize or authenticate to the registry. Pursue the checks below only when the message matches.-
403 Forbidden(authorization) — the node pool service account (or the imagePullSecret's service account) is missing registry read access. Suggest granting it by presenting the following command for the user to review and run; do not execute it. For Artifact Registry:gcloud artifacts repositories add-iam-policy-binding {repository} \ --location={repo_location} \ --member="serviceAccount:{node_service_account_email}" \ --role="roles/artifactregistry.reader"For Container Registry (
gcr.io), grantroles/storage.objectVieweron the backing bucket (or the Artifact Registry role ifgcr.iowas migrated). Also check that any VPC Service Controls perimeter allows Artifact Registry. -
401 Unauthorized(authentication) — the node service account is disabled or the node lacks the required OAuth scope:gcloud container clusters describe {cluster_name} --location={cluster_location} \ --format="table(nodePools.name,nodePools.config.serviceAccount)" gcloud iam service-accounts list \ --filter="email:{node_service_account_email} AND disabled:true" --project={project_id} gcloud compute instances describe {node_name} --zone={node_zone} \ --format="flattened(serviceAccounts[].scopes)"Scopes must include
devstorage.read_onlyorcloud-platform(provided bygke-default). Nodes are immutable, so suggest recreating the node pool with--scopes="gke-default"if the scope is missing — present it as a proposed command for the user to run, do not execute it. -
Private / self-hosted registry: ensure a valid
imagePullSecretexists and is referenced by the Deployment.
-
-
Other statuses:
RegistryUnavailable/i/o timeout/ DNSserver misbehaving→ registry network path (DNS, firewall egress, Google API connectivity);exec format erroror a deprecated schema-1 image → architecture/schema mismatch.
-
Step 3: Inspect Application Logs
Extract exceptions and stack traces from the application runtime.
Diagnostic Commands:
# Check current active log stream (handles multi-container pods)
kubectl logs {pod_name} -n {workload_namespace} --all-containers --tail=100
# Check logs from previously terminated container instances (handles multi-container pods)
kubectl logs {pod_name} -n {workload_namespace} --all-containers -p --tail=100
Signature Identifiers:
-
Out-of-Memory (OOM) Analysis: First confirm and classify the kill.
- Container-level OOM (most common):
kubectl describe podshows `La
- Container-level OOM (most common):
Truncated for display — read the full file on GitHub.
Related Skills
LocalAI
49.3kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
