Agent skill
investigate-pod-failure
Deep investigation of a failing pod. Gathers logs, events, and resource status to identify root cause. Keywords: investigate, debug, pod failure, troubleshoot, root cause, logs, events.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/investigate-pod-failure
Metadata
Additional technical details for this skill
- domain
- k8s
- category
- diagnostic
- confidence
- 0.95
- mcp servers
-
[ "kubernetes-mcp-server" ] - requires approval
- NO
SKILL.md
Investigate Pod Failure
Preconditions
Before applying this skill, verify:
- Pod is in a failed or error state
- Pod has been created (not stuck in Pending)
Actions
1. Get Pod Status and Details
Retrieve the full pod specification and current status.
mcp_tool: kubernetes-mcp-server/pods_get
params:
name: $pod_name
namespace: $namespace
timeout: 30s
2. Get Pod Logs
Retrieve recent logs from the pod container.
mcp_tool: kubernetes-mcp-server/pods_log
params:
name: $pod_name
namespace: $namespace
tail: 100
timeout: 30s
3. Get Recent Events
Retrieve recent events related to the pod.
mcp_tool: kubernetes-mcp-server/events_list
params:
namespace: $namespace
timeout: 30s
Success Criteria
The skill succeeds when:
- Root cause identified from logs or events
- Investigation produces actionable findings
Failure Handling
If investigation is inconclusive:
- Check previous container logs (--previous flag)
- Describe the pod for more context
- Check node events if pod failed to schedule
- Escalate with all gathered data
Examples
Input Context:
{
"pod_name": "backend-api-abc123",
"namespace": "production",
"status": "Error",
"exit_code": 1
}
Expected Outcome: Investigation reveals root cause (e.g., missing config, connection refused, OOM killed) with specific actionable recommendations.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?