rpk cluster health

Query cluster health and display the overall health status of the cluster. Redpanda collects health reports periodically from all nodes and aggregates them into a health overview.

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

Usage

rpk cluster health [flags]

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

-e, --exit-when-healthy

bool

Exit with status 0 when the cluster becomes healthy. Useful for scripts waiting for cluster readiness.

--format

string

Output format (json,yaml,text,wide,help).

-w, --watch

bool

Continuously monitor health status, refreshing periodically.

Global flags

Value Type Description

--config

string

Redpanda or rpk config file; default search paths are ~/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml.

-X, --config-opt

stringArray

Override rpk configuration settings; -X help for detail or -X list for terser detail.

--ignore-profile

bool

Ignore rpk.yaml and redpanda.yaml; use default settings.

--profile

string

rpk profile to use.

-v, --verbose

bool

Enable verbose logging.