Show cluster info

Shows the API server and CoreDNS endpoints

kubectl cluster-info

tool
kubectl73 commands
tags
debugconfig

More kubectl commands

  • kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{": "}{range .status.conditions[*]}{.type}={.status},{" "}{end}{"\n"}{end}'

    All conditions of each node (Ready, MemoryPressure, DiskPressure)

  • kubectl create job --from=cronjob/<name> manual-run -n <ns>

    Starts a CronJob right now as a one-off Job

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

    Waits until matching pods are Ready or the timeout runs out

  • kubectl get --raw /metrics | grep apiserver_request_total

    Pulls raw Prometheus metrics from the apiserver, no monitoring stack needed

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

    Checks etcd connectivity through the apiserver health endpoint

all 73 kubectl commands