rpk cluster fencing status

Get the fencing status of the cluster.

The command shows fencing as the controller leader has it. A broker that did not answer shows the error instead of a state.

Fencing has one of these states:

  • UNFENCED: fencing is disabled.

  • FENCING: some brokers did not yet apply the latest change. A broker that is down counts as a broker that did not apply the change.

  • FENCED: every broker enforces fencing.

  • UNFENCING: some brokers did not yet stop fencing.

The revision changes with each rpk cluster fencing enable, disable, and config update that changes fencing. It is -1 until the first change. Give it to --expected-revision to make a change fail if somebody else changed fencing first.

Use --node-id to get the fencing state on one broker.

This command was introduced in version v26.3.1.

Usage

rpk cluster fencing status [flags]

Examples

This section provides examples of how to use rpk cluster fencing status.

Get the fencing status:

rpk cluster fencing status

Get the fencing state on broker 2:

rpk cluster fencing status --node-id 2

Get the status as JSON:

rpk cluster fencing status --format json

Flags

Value Type Description

--format

string

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

--node-id

int32

Show only the fencing state on the broker with this node ID.

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.