troubleshooting-kubernetes

Diagnose Kubernetes workload, Service, NetworkPolicy, and Helm release failures with read-only kubectl evidence.

Updated May 11, 2026
One-click install
npx skills add https://github.com/cloudofgeorge/AI-hands-Engineer --skill troubleshooting-kubernetes-cloudofgeorge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: troubleshooting-kubernetes
Source: https://github.com/cloudofgeorge/AI-hands-Engineer/tree/main/skills/engineering/domains/infrastructure/troubleshooting-kubernetes
Command: npx skills add https://github.com/cloudofgeorge/AI-hands-Engineer --skill troubleshooting-kubernetes-cloudofgeorge

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Kubernetes incidents like CrashLoopBackOff, Pending Pods, and Service connectivity failures are often mishandled by mutating the cluster before understanding root cause. This Skill enforces an evidence-first, read-only diagnostic workflow so you identify the real failure before proposing any change. ## Core Features & Use Cases - Structured evidence capture: Collect Pod state, events, current and previous container logs, EndpointSlices, and NetworkPolicies with explicit context and namespace scoping. - Symptom-driven diagnosis: Follow decision branches for CrashLoopBackOff, Pending, ImagePullBackOff, Service failures, permission errors, and network path issues. - Safe change management: Preview rollbacks with dry-run, require explicit user confirmation for any mutation, and verify success signals before closing an incident. - Use Case: A Deployment's Pods are stuck in CrashLoopBackOff after a release. Use this Skill to inspect previous container logs and events, form a falsifiable hypothesis, and propose an approved rollback with a defined verification command. ## Quick Start Use the troubleshooting-kubernetes skill to diagnose why the Pods in my payments namespace are stuck in CrashLoopBackOff.

Frequently Asked Questions about troubleshooting-kubernetes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I troubleshoot a CrashLoopBackOff Pod in Kubernetes?

Inspect the Pod with kubectl describe, then read current logs and previous container logs with kubectl logs --previous. Check the exit code, probes, command/args, and resource limits to distinguish application startup failure from probe or resource issues before restarting anything.

How to diagnose why a Kubernetes Service has no endpoints?

Compare the Service selector and ports against Pod labels using kubectl get pods --show-labels, then inspect EndpointSlices for the Service. Confirm at least one ready Pod matches the selector before investigating DNS, kube-proxy, or NetworkPolicies.

Why is my Kubernetes Pod stuck in Pending state?

Pending Pods usually indicate scheduling failure. Check Pod events for FailedScheduling messages, then review node selectors, affinity rules, taints and tolerations, resource requests, and namespace quotas to identify the blocking constraint.

Can I disable a NetworkPolicy to test connectivity?

No. Removing or weakening a NetworkPolicy as a diagnostic shortcut risks exposing unrelated traffic, and policy behavior depends on the installed CNI plugin. Instead, map source and destination labels, ports, namespaces, and ingress/egress rules to identify the blocking policy.

What should I check before rolling back a Kubernetes deployment?

Review rollout history with kubectl rollout history and preview the change using rollout undo --dry-run=server. Before any live rollback, confirm the target context and namespace, exact revision, success signal, rollback method, and observation window with explicit approval.

How do I inspect a failed Helm release safely?

Use read-only Helm commands: helm status, helm history, helm get values --all, and helm get manifest in the target namespace. Capture chart version, effective values, and events before proposing any uninstall, reinstall, or rollback, since those are production mutations.