Agent skill
restart-crashloop
Restart a pod stuck in CrashLoopBackOff. Use when pod has crashed 3+ times and a restart might resolve transient issues. Keywords: crashloop, restart, pod failure, container crash, pod stuck, pod crashing.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/restart-crashloop
Metadata
Additional technical details for this skill
- domain
- k8s
- category
- remediation
- confidence
- 0.85
- mcp servers
-
[ "kubernetes-mcp-server" ] - requires approval
- NO
SKILL.md
Restart CrashLoopBackOff Pod
Preconditions
Before applying this skill, verify:
- Pod status is CrashLoopBackOff
- Pod has restarted more than 3 times
- Pod is NOT part of a Job or CronJob
- No OOMKilled events in last 10 minutes
Actions
1. Delete Pod to Trigger Recreation
Use the kubernetes-mcp-server to delete the pod. The deployment controller will automatically create a replacement pod.
mcp_tool: kubernetes-mcp-server/pods_delete
params:
name: $pod_name
namespace: $namespace
timeout: 30s
Success Criteria
The skill succeeds when:
- New pod created within 30 seconds
- New pod reaches Running state within 2 minutes
- No CrashLoopBackOff within 5 minutes of restart
Failure Handling
If the pod does not reach Running state:
- Check events for the new pod
- Check logs from the new pod
- Escalate to human if pattern repeats 3 times
Examples
Input Context:
{
"pod_name": "nginx-deployment-abc123",
"namespace": "default",
"restart_count": 5,
"status": "CrashLoopBackOff"
}
Expected Outcome: Pod deleted, new pod reaches Running within 2 minutes.
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?