Force delete stuck pod

Remove a Terminating pod immediately (use with caution)

kubectl delete pod <name> -n <ns> --grace-period=0 --force

tool
kubectl73 commands
tags
podsdebug

More kubectl commands

  • kubectl cp <ns>/<pod>:/remote/path ./local-path

    Extract a file from a running container

  • kubectl cordon <node>

    Mark node as unschedulable — no new pods land here

  • kubectl drain <node> --ignore-daemonsets --delete-emptydir-data

    Gracefully evict all pods before maintenance

  • kubectl edit deployment/<name> -n <ns>

    Open resource in $EDITOR; changes applied on save

  • kubectl auth can-i list pods --as=system:serviceaccount:<ns>:<sa> -n <ns>

    Check what a ServiceAccount is allowed to do

all 73 kubectl commands