Linux command
kubectl-cluster-info 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Display cluster info
kubectl cluster-info
Show detailed cluster info
kubectl cluster-info dump
Dump cluster info to directory
kubectl cluster-info dump --output-directory=[path]
Dump specific namespaces
kubectl cluster-info dump --namespaces=[default],[kube-system]
说明
kubectl cluster-info displays the addresses of the control plane and cluster services. The dump subcommand collects cluster state information for debugging, including logs from all pods and cluster metadata.
参数
- dump
- Dump cluster state for debugging.
- --output-directory _path_
- Directory to dump files.
- --namespaces _list_
- Namespaces to include in dump.
- --all-namespaces
- Include all namespaces.
FAQ
What is the kubectl-cluster-info command used for?
kubectl cluster-info displays the addresses of the control plane and cluster services. The dump subcommand collects cluster state information for debugging, including logs from all pods and cluster metadata.
How do I run a basic kubectl-cluster-info example?
Run `kubectl cluster-info` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does dump do in kubectl-cluster-info?
Dump cluster state for debugging.