rpk cluster health
Queries cluster for health overview.
Health overview is created based on the health reports collected periodically from all nodes in the cluster. A cluster is considered healthy when the following conditions are met:
-
All cluster nodes are responding
-
All partitions have leaders
-
The cluster controller is present
If the cluster is reported as unhealthy, rpk will exit with code 10.
Examples
This section provides examples of how to use rpk cluster health.
Basic usage, get cluster health information:
rpk cluster health
Get cluster health information and watch for changes:
rpk cluster health --watch
Get cluster health information and exit when the cluster is healthy:
rpk cluster health --exit-when-healthy
Flags
| Value | Type | Description |
|---|---|---|
|
bool |
Exits when the cluster is back in a healthy state. Only available for |
|
string |
Output format ( |
|
bool |
Blocks and writes out all cluster health changes. Only available for |
Global flags
| Value | Type | Description |
|---|---|---|
|
string |
Redpanda or |
|
stringArray |
Override |
|
bool |
Ignore |
|
string |
|
|
bool |
Enable verbose logging. |