inspection

kubectl cluster-info

Prints the endpoints of the control-plane services for the current context. The dump subcommand collects a large diagnostic bundle of cluster state for offline analysis.

kubectl cluster-info [dump] [flags]

Common flags

Flag Purpose
--output-directory With dump, write files to a directory instead of stdout.
--all-namespaces With dump, include every namespace (default false).
--namespaces With dump, comma-separated namespaces to include.
--context Use a specific context without switching the default.

Examples

kubectl cluster-info

Show API server and core-services URLs.

kubectl cluster-info dump --output-directory=./dump --all-namespaces

Snapshot the entire cluster for support triage.

kubectl cluster-info --context=staging

Query the staging cluster without switching context.

Gotcha

cluster-info dump can produce hundreds of megabytes and may include secrets in plain text - handle the output carefully.

Related commands

← All kubectl commands · Docker vs Kubernetes