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 |
Exit with status 0 when the cluster becomes healthy. Useful for scripts waiting for cluster readiness. |
|
string |
Output format ( |
|
bool |
Continuously monitor health status, refreshing periodically. |
Global flags
| Value | Type | Description |
|---|---|---|
|
string |
Redpanda or |
|
stringArray |
Override |
|
bool |
Ignore |
|
string |
|
|
bool |
Enable verbose logging. |