Force-remove stuck Terminating pod k8s-debug
Clear finalizers to unstick a pod hung in Terminating; note: confirm node is gone first
kubectl patch po <pod> -n <ns> -p '{"metadata":{"finalizers":null}}' --type=merge; kubectl delete po <pod> -n <ns> --grace-period=0 --force
more k8s-debug
all 27 commands →
Raw kubelet stats summary
kubectl get --raw /api/v1/nodes/<node>/proxy/stats/summary | jq '.pods[] | {name:.podRef.name, mem:.memory.workingSetBytes}'
Conntrack stats on node
kubectl debug node/<node> -it --image=nicolaka/netshoot -- conntrack -S
In-cluster DNS resolution test
kubectl run dnstest --rm -it --image=nicolaka/netshoot --restart=Never -- dig +short <name>.<ns>.svc.cluster.local
Ordered events for a pod
kubectl events --for pod/<pod> -n <ns> --types=Warning
Previous crash logs with timestamps
kubectl logs <pod> -n <ns> -c <name> --previous --timestamps --tail=200