Wait for pod ready

Block until matching pods are Ready or timeout

kubectl wait pod -l app=<label> -n <ns> --for=condition=Ready --timeout=120s

tool
kubectl73 commands
tags
podsconfig

More kubectl commands

  • kubectl get --raw /metrics | grep apiserver_request_total

    Pull raw Prometheus metrics from the apiserver without a metrics stack

  • kubectl get --raw '/healthz/etcd?verbose'

    Verify etcd connectivity through the apiserver health endpoint

  • kubectl get --raw '/apis/metrics.k8s.io/v1beta1/nodes' | jq '.items[] | {name:.metadata.name, cpu:.usage.cpu, mem:.usage.memory}'

    Raw node usage from metrics API; bypasses kubectl top formatting

  • kubectl debug <pod> -n <ns> --copy-to=<pod>-dbg --share-processes --image=nicolaka/netshoot -- sleep infinity

    Clone pod with a debug container sharing the PID namespace; original stays untouched

  • kubectl explain deploy.spec --recursive | less

    Dump the full nested field tree of a resource spec; great for hunting valid fields

all 73 kubectl commands