Skip to main content
Navigation
HomeTechnical ReferenceJournalGitHubGitHub
Sidebar — toggle document categories via the logo
Categories

Force Delete a Stuck Kubernetes Pod

Objective

Remove a pod that is stuck in Terminating state when the standard deletion grace period does not complete.

Prerequisites

  • kubectl configured with access to the target cluster and namespace.
  • The pod name and namespace.

Procedure

  1. Identify the stuck pod:

    kubectl get pods -n <namespace>
  2. Attempt a normal deletion with a short grace period:

    kubectl delete pod <pod-name> -n <namespace> --grace-period=0
  3. If the pod remains, force delete it:

    kubectl delete pod <pod-name> -n <namespace> --grace-period=0 --force
  4. If the pod is managed by a workload controller, scale the controller to zero and back to trigger reconciliation:

    kubectl scale deployment/<name> -n <namespace> --replicas=0
    kubectl scale deployment/<name> -n <namespace> --replicas=<original-count>

Verification

  • Run kubectl get pods -n <namespace> and confirm the pod is no longer listed.
  • Check the workload controller events to ensure a replacement pod is running correctly.