Find the ImagePullBackOff cause

Show image pull errors from the registry: wrong tag, missing imagePullSecret or rate limit

kubectl get events -n <ns> --field-selector reason=Failed -o wide | grep -i 'pull\|manifest\|unauthorized'

tool
k8s-debug27 commands
tags
k8s-debugtroubleshootingk8ssecurity

More k8s-debug commands

  • kubectl get po -A | grep Evicted | awk '{print $2" -n "$1}' | xargs -L1 kubectl delete po

    Delete all Evicted pods left after node-pressure eviction

  • kubectl patch po <pod> -n <ns> -p '{"metadata":{"finalizers":null}}' --type=merge; kubectl delete po <pod> -n <ns> --grace-period=0 --force

    Clear finalizers and force-delete a pod stuck in Terminating; first make sure the node is really gone

  • kubectl get --raw /api/v1/nodes/<node>/proxy/stats/summary | jq '.pods[] | {name:.podRef.name, mem:.memory.workingSetBytes}'

    Get live memory per pod from the kubelet Summary API, without metrics-server

  • kubectl debug node/<node> -it --image=nicolaka/netshoot -- conntrack -S

    Check conntrack drop and insert_failed counters per CPU; a full nf_conntrack table drops packets

  • kubectl run dnstest --rm -it --image=nicolaka/netshoot --restart=Never -- dig +short <name>.<ns>.svc.cluster.local

    Resolve a Service FQDN from a temporary pod to tell CoreDNS problems from app DNS problems

all 27 k8s-debug commands