k8s-troubleshoot

Diagnose Kubernetes pod and deployment issues using kubectl workflows.

2|Updated Jun 29, 2021
One-click install
npx skills add https://github.com/pypeaday/dotfiles --skill k8s-troubleshoot-pypeaday
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: k8s-troubleshoot
Source: https://github.com/pypeaday/dotfiles/tree/main/opencode/.config/opencode/skill/k8s-troubleshoot
Command: npx skills add https://github.com/pypeaday/dotfiles --skill k8s-troubleshoot-pypeaday

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines diagnosing Kubernetes issues by guiding users through a structured workflow to inspect pods, events, and logs.

Core Features & Use Cases

  • Pod status and events inspection with kubectl get pods, kubectl describe pod, and kubectl get events.
  • Log analysis and troubleshooting using kubectl logs and related tools to identify root causes.
  • Deployment health checks and resource diagnostics to quickly resolve failures in dev and production environments.

Quick Start

Activate the skill and begin with a basic diagnosis: run kubectl get pods -o wide to identify pod states, then kubectl describe pod <pod> and kubectl logs <pod> to gather details.

Frequently Asked Questions about k8s-troubleshoot

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

FAQPage Schema
How do I troubleshoot a Kubernetes pod stuck in CrashLoopBackOff?

To troubleshoot a CrashLoopBackOff, inspect pod events and container logs. Use kubectl describe pod to view lifecycle events and kubectl logs to identify the application error causing the repeated crashes.

What is the best way to diagnose Kubernetes pods stuck in Pending status?

Diagnosing Pending pods involves checking cluster events and resource availability. Run kubectl get events to find scheduling failures and kubectl describe pod to see if insufficient resources or node constraints are blocking deployment.

How do I find the root cause of an OOMKilled pod in Kubernetes?

Finding the root cause of an OOMKilled pod requires checking pod events and resource diagnostics. Use kubectl describe pod to confirm the OOMKilled state and kubectl logs to review memory usage errors before the crash.

Can I use kubectl to debug service connectivity issues in production?

Yes, you can use kubectl to debug service connectivity in production. Use kubectl get pods and kubectl logs to verify endpoint availability and inspect application errors affecting network traffic.

Do I need external tools to troubleshoot Kubernetes deployment failures?

No external tools are required to troubleshoot Kubernetes deployment failures. You only need standard kubectl tooling and access to the cluster context to inspect pod states, events, and logs.

Why does my Kubernetes deployment fail when resources are available?

Deployment failures with available resources may stem from application errors or misconfigurations. Run kubectl describe pod to inspect events and kubectl logs to check for runtime exceptions preventing startup.