# cluster update-features

Upgrade, safe-downgrade, or unsafe-downgrade one or more finalized feature versions

Package: @cookiemonsterdev/kafka-cli 1.12.1
Canonical: https://cookiemonsterdev.github.io/kafka/docs/cli/reference/commands/cluster/update-features/
Source revision: b112a684d2b3cdc7deadb3513041fcdbdc1c18b5

<!-- Generated by scripts/generate-cli-docs.mjs. Do not edit by hand. -->

```sh
kafka cluster update-features
```

Upgrade, safe-downgrade, or unsafe-downgrade one or more finalized feature versions

Shared options and defaults: [connection profiles, JSON output, logging and help](https://cookiemonsterdev.github.io/kafka/docs/cli/reference/global-options/).

## Defaults

Upgrade type defaults to upgrade. Use explicit downgrade modes only after checking broker compatibility.

## Before you run

Changes finalized feature versions. Downgrades may be rejected or unsafe for existing metadata. Confirm the supported feature range and rollback constraints first.

## Flags

| Flag                                 | Description                                                                                 |
| ------------------------------------ | ------------------------------------------------------------------------------------------- |
| `--brokers <string>`                 | comma-separated broker list, e.g. localhost:9092                                            |
| `--feature <key=value> (repeatable)` | a feature to update, name=maxVersionLevel (repeatable)                                      |
| `--upgrade-type <string>`            | upgrade, safe-downgrade, or unsafe-downgrade (default: upgrade), applied to every --feature |
| `--timeout <number>`                 | request timeout in ms                                                                       |
| `--dry-run`                          | validate on the broker without finalizing anything                                          |
| `--yes`                              | confirm the update without an interactive prompt                                            |
| `--force`                            | required in addition to --yes for an unsafe downgrade                                       |

## Examples

```sh
kafka cluster update-features --feature kraft.version=1 --brokers localhost:9092 --yes
kafka cluster update-features --feature kraft.version=0 --upgrade-type unsafe-downgrade --yes --force --brokers localhost:9092
```

## Output

Illustrative, abbreviated output. Empty arrays show the result envelope; actual entries, identifiers, optional fields and broker errors depend on the request and cluster.

With `--json`:

```json
{
  "results": []
}
```

Declared exit codes: `0`, `1`, `2`, `4`, `5`. See the exit-code reference for meanings.

## Related commands

[Browse the command group](https://cookiemonsterdev.github.io/kafka/docs/cli/reference/commands/#cluster) · [Exit codes](https://cookiemonsterdev.github.io/kafka/docs/cli/reference/exit-codes/)
