kubernetes-job-troubleshooting

Diagnose and resolve stuck or crashing Kubernetes Jobs, CronJobs, and Deployment pods.

2|Updated Oct 20, 2017
One-click install
npx skills add https://github.com/rbudiharso/dotfiles --skill kubernetes-job-troubleshooting-rbudiharso
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: kubernetes-job-troubleshooting
Source: https://github.com/rbudiharso/dotfiles/tree/main/hermes/.hermes/skills/devops/kubernetes-job-troubleshooting
Command: npx skills add https://github.com/rbudiharso/dotfiles --skill kubernetes-job-troubleshooting-rbudiharso

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Kubernetes pods that hang for hours, CrashLoopBackOff after a rollout, or silently fail against external systems (like backup agents on EC2) are hard to diagnose with kubectl alone. This Skill provides a structured diagnosis and resolution workflow for stuck Jobs, blocked CronJobs, broken Deployment rollouts, and cluster-wide issue triage. ## Core Features & Use Cases - Stuck Job/CronJob Diagnosis: Step-by-step workflow to find pods across clusters, inspect logs and events, identify root-cause patterns (polling loops, external dependency failures, stale locks), and cancel/restart operations safely. - Deployment Rollback: Identify broken ReplicaSet revisions from CrashLoopBackOff pods and roll back with rollout undo --to-revision, including Node.js missing-module image failure patterns. - Cluster-Wide Triage with Radar MCP: Triage manifest-fixable issues (orphaned HPAs, failed Jobs, TLS Certificate conflicts, missing imagePullSecrets) versus stale cache or node-level problems. - Use Case: A mongodb-backup CronJob pod has been Running for 31 hours. Use this Skill to discover the PBM agent was restarted mid-backup leaving a stale lock, cancel the backup to release the lock, delete the pod, and verify the new backup progresses. ## Quick Start Ask the assistant to diagnose why a specific Kubernetes Job or Deployment pod is stuck or CrashLoopBackOff-ing, providing the pod name and cluster context if known.

Frequently Asked Questions about kubernetes-job-troubleshooting

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

FAQPage Schema
How do I troubleshoot a stuck Kubernetes Job or CronJob pod?▼

Check pod status and age with kubectl get pod, review current and previous logs, describe the pod for events, and check Job completions. A pod Running far longer than expected with repeating log output usually means a --wait command polling a hung external operation.

How to rollback a Kubernetes Deployment with CrashLoopBackOff pods?▼

List ReplicaSets to find the working revision, then run kubectl rollout undo deploy/<name> --to-revision=<N>. The old ReplicaSet keeps serving during a broken rollout, so rollback restores service without building a new image first.

Why does my Kubernetes Job show Running but make no progress?▼

The pod is often a client calling an external system whose agent died mid-operation, leaving a stale lock. Agent status may report OK while actual work produces zero output, so check the external system's logs directly rather than trusting pod status.

Can kubectl run create a pod with a service account?▼

No, --serviceaccount is not a valid flag for kubectl run. Use a Pod manifest applied with kubectl apply, or pass --overrides JSON, when you need a service account, secrets, or volume mounts for ad-hoc debug pods.

Why does a CronJob stop scheduling new runs?▼

With the default concurrencyPolicy: Forbid, a stuck or failed Job blocks all future scheduled runs. Delete the stuck Job and set failedJobsHistoryLimit and successfulJobsHistoryLimit on the CronJob to prevent accumulation.

What causes IncorrectCertificate errors with cert-manager and Gateway?▼

Two Certificate resources writing to the same Secret conflict: one auto-created by the Gateway's cert-manager.io/cluster-issuer annotation and one manual. Delete the manual Certificate, clear stale cert-manager annotations from the Secret, and let the Gateway-owned cert reconcile.