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. |
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 |
|---|---|---|
|
string |
Output format ( |
|
int32 |
Show only the fencing state on the broker with this node ID. |
Global flags
| Value | Type | Description |
|---|---|---|
|
string |
Redpanda or |
|
stringArray |
Override |
|
bool |
Ignore |
|
string |
|
|
bool |
Enable verbose logging. |