Agent skill
restart-imagepullbackoff
Handle a pod stuck in ImagePullBackOff state. First investigates the image pull error, then restarts to retry. Keywords: imagepull, image pull backoff, ErrImagePull, registry, container image, pull failed.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/restart-imagepullbackoff
Metadata
Additional technical details for this skill
- domain
- k8s
- category
- remediation
- confidence
- 0.7
- mcp servers
-
[ "kubernetes-mcp-server" ] - requires approval
- NO
SKILL.md
Handle ImagePullBackOff
Preconditions
Before applying this skill, verify:
- Pod status is ImagePullBackOff or ErrImagePull
- Pod has been in this state for more than 2 minutes
Actions
1. Get Pod Events
First, get pod events to understand the image pull failure.
mcp_tool: kubernetes-mcp-server/events_list
params:
namespace: $namespace
timeout: 30s
2. Delete Pod to Trigger Recreation
Delete the pod to trigger recreation and retry the image pull.
mcp_tool: kubernetes-mcp-server/pods_delete
params:
name: $pod_name
namespace: $namespace
timeout: 30s
Success Criteria
The skill succeeds when:
- New pod created and image pull succeeds
- Pod reaches Running state within 5 minutes
Failure Handling
If image pull continues to fail:
- Verify image name and tag are correct
- Check image registry connectivity
- Verify image pull secrets are configured
- Escalate to human with registry details
Examples
Input Context:
{
"pod_name": "myapp-deployment-xyz789",
"namespace": "production",
"status": "ImagePullBackOff",
"image": "registry.example.com/myapp:v1.2.3"
}
Expected Outcome: Pod deleted, new pod successfully pulls image and reaches Running state.
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?