Raw kubelet stats summary

Pull live per-pod memory from kubelet Summary API, bypassing metrics-server

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

tool
k8s-debug27 commands
tags
k8s-debugmonitoringperformancek8s

More k8s-debug commands

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

    Check per-CPU conntrack drops/insert_failed; nf_conntrack table exhaustion drops packets

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

    Resolve a Service FQDN from an ephemeral pod to isolate CoreDNS vs app DNS issues

  • kubectl events --for pod/<pod> -n <ns> --types=Warning

    Stream only Warning events scoped to one pod in chronological order; modern: replaces get events filter

  • kubectl logs <pod> -n <ns> -c <name> --previous --timestamps --tail=200

    Tail the crashed container's prior instance logs to catch the pre-restart stack trace

  • kubectl debug -it <pod> --image=nicolaka/netshoot -n <ns>

    Attach a debug container (netshoot) to a running pod — shares PID/net namespaces

all 27 k8s-debug commands