Wait for pod ready kubectl
Block until matching pods are Ready or timeout
kubectl wait pod -l app=<label> -n <ns> --for=condition=Ready --timeout=120s
more kubectl
all 73 commands →
Scrape apiserver metrics endpoint
kubectl get --raw /metrics | grep apiserver_request_total
Check etcd health via apiserver
kubectl get --raw '/healthz/etcd?verbose'
Node metrics from metrics.k8s.io API
kubectl get --raw '/apis/metrics.k8s.io/v1beta1/nodes' | jq '.items[] | {name:.metadata.name, cpu:.usage.cpu, mem:.usage.memory}'
Ephemeral debug copy with shared PIDs
kubectl debug <pod> -n <ns> --copy-to=<pod>-dbg --share-processes --image=nicolaka/netshoot -- sleep infinity
Explain deployment spec recursively
kubectl explain deploy.spec --recursive | less