health cluster
command
Check the health of cluster resources, such as machine configuration pools, cluster operators, and the Red Hat® OpenShift® Kubernetes etcd cluster.
The command also runs a connectivity test to see whether you can access allowed URLs for offline installation.
Prerequisites
- Log in to Red Hat OpenShift Container Platform as a cluster administrator.
- Verify the configuration file.Important: A Kubernetes configuration file must be at either ~/.kube/config or ~/auth/kubeconfig for this command to work. The file must have the target cluster as the current context.
Syntax and command options
The following example shows the syntax that you must use when you run the
cluster
command:
guardcenter-cli health cluster \
[--save] \
[--verbose]
Configure the following command options when you run the
cluster
command:
Option | Description |
---|---|
|
Display command help.
|
--log-level |
The command log level.
|
--save |
Save the output and resource YAML files to the local file system.
|
--verbose |
Display detailed information about resources in table format.
|
Example
The following command example checks the overall health of the
cluster:
guardcenter-cli health cluster
The following example shows a successful output:
Cluster Version Check [SUCCESS...] Connectivity Test [SUCCESS...] Machine Config Pools Healthcheck [SUCCESS...] Certificate Signing Request Healthcheck [SKIP...] Cluster Operator Healthcheck [SUCCESS...] ETCD Healthcheck [SUCCESS...]