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:
Table 1. cluster command options
Option Description

--help

-h

Display command help.
Status
Optional
Syntax
--help
Default value
Not applicable
Valid values
Not applicable
--log-level The command log level.
Status
Optional
Syntax
--log-level=debug|trace
Default value
Not applicable
Valid values
debug - debug messages are written to the log.
trace - trace messages are written to the log.
--save Save the output and resource YAML files to the local file system.
Status
Optional
Syntax
--save
Default value
false
Valid values
true
false
--verbose Display detailed information about resources in table format.
Status
Optional
Syntax
--verbose
Default value
false
Valid values
true
false

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...]