Get cluster info kubectl
Show API server and CoreDNS endpoints
kubectl cluster-info
more kubectl
all 73 commands →
Get node conditions
kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{": "}{range .status.conditions[*]}{.type}={.status},{" "}{end}{"\n"}{end}'
Trigger CronJob manually
kubectl create job --from=cronjob/<name> manual-run -n <ns>
Wait for pod ready
kubectl wait pod -l app=<label> -n <ns> --for=condition=Ready --timeout=120s
Scrape apiserver metrics endpoint
kubectl get --raw /metrics | grep apiserver_request_total
Check etcd health via apiserver
kubectl get --raw '/healthz/etcd?verbose'