restart-crashloop

Restart Kubernetes pods in CrashLoopBackOff after verifying status and OOMKilled events.

3|Updated Dec 2, 2025
One-click install
npx skills add https://github.com/X-McKay/kubani --skill restart-crashloop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: restart-crashloop
Source: https://github.com/X-McKay/kubani/tree/main/kubani/skills/k8s/remediation/restart-crashloop
Command: npx skills add https://github.com/X-McKay/kubani --skill restart-crashloop

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses pods that are repeatedly crashing and getting stuck in a CrashLoopBackOff state, preventing application downtime.

Core Features & Use Cases

  • Automated Pod Restart: Intelligently restarts pods stuck in a CrashLoopBackOff state to resolve transient issues.
  • Precondition Checks: Ensures the pod is not part of a critical job and hasn't recently experienced an OOMKilled event before attempting a restart.
  • Use Case: When your nginx-deployment pod is stuck in CrashLoopBackOff after multiple restarts, this skill will safely delete and recreate it, aiming to restore service.

Quick Start

Use the restart-crashloop skill to fix the pod named 'my-app-pod' in the 'development' namespace.

Frequently Asked Questions about restart-crashloop

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

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

To fix a Kubernetes pod stuck in CrashLoopBackOff, you can delete the failing pod to trigger an automated recreation, resolving transient issues. This approach targets stateless applications after verifying restart counts and ruling out OOMKilled events.

When should I restart a pod to resolve a CrashLoopBackOff status?

You should restart a pod to resolve a CrashLoopBackOff status when the application is stateless and the failure is transient. It is crucial to verify the pod has no recent OOMKilled events and is not part of a critical job before deleting it.

Can I use a pod restart for stateful applications in CrashLoopBackOff?

Restarting is intended for stateless applications where transient issues can be resolved by pod recreation. You should not use this pod restart approach for stateful applications or critical jobs without proper precondition checks.

What is the best way to safely delete a Kubernetes pod in CrashLoopBackOff?

The best way to safely delete a Kubernetes pod in CrashLoopBackOff is to verify the pod status, check the restart count, and confirm the absence of recent OOMKilled events first, ensuring it is not a critical job before executing the delete operation.

Why does my Kubernetes pod keep restarting with CrashLoopBackOff after multiple attempts?

Your Kubernetes pod keeps restarting with CrashLoopBackOff after multiple attempts due to repeatedly crashing processes. Deleting the pod for recreation can resolve transient issues, provided it is a stateless application without recent OOMKilled events.