Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.

Build Deploy PyPI Downloads License Strimzi AMQ Streams

Strimzi CLI logo

Strimzi Kafka CLI

Strimzi Kafka CLI is a CLI that helps traditional Apache Kafka users -both developers and administrators- to easily adapt to Strimzi, a Kubernetes operator for Apache Kafka.

The main intention is to ramp up Strimzi usage by creating a similar CLI experience with the traditional Apache Kafka tools that mostly starts with kafka-* prefix under the bin directory in an ordinary Kafka package.

Strimzi Kafka CLI uses the kfk command as an abbreviation for "Kafka For Kubernetes" or simply "k a f k a" which reminds of the kafka-* prefix of the ordinary Kafka script file names.

While having similar set of commands or options for some of the common objects, Strimzi Kafka CLI has some extra capabilities for managing or configuring Strimzi related resources.

Following are the commands of the current version of Strimzi Kafka CLI, that are used for different purposes:

Usage: kfk [OPTIONS] COMMAND [ARGS]...

  Strimzi Kafka CLI

  --version  Show the version and exit.
  --help     Show this message and exit.

  acls              Manages ACLs on Kafka.
  clusters          Creates, alters, deletes, describes Kafka cluster(s).
  configs           Adds/Removes entity config for a topic, client, user or...
  connect           Creates, alters, deletes, describes Kafka connect...
  console-consumer  Reads data from Kafka topics and outputs it to standard...
  console-producer  Reads data from standard input and publish it to Kafka.
  env               Prints the environment variable values for Strimzi Kafka CLI
  operator          Installs/Uninstalls Strimzi Kafka Operator
  topics            Creates, alters, deletes, describes Kafka topic(s).
  users             Creates, alters, deletes, describes Kafka users(s).

Please take a look at the relevant article Strimzi Kafka CLI: Managing Strimzi in a Kafka Native Way for more details.


Using Python Package Installer

pip install strimzi-kafka-cli --user

Or to install Strimzi Kafka CLI in an isolated environment, you can simply use pipx:

pipx install strimzi-kafka-cli

Using Homebrew

#Tap the homebrew repository first.
brew tap systemcraftsman/strimzi-kafka-cli

#Install Strimzi Kafka CLI
brew install strimzi-kafka-cli

Installing the CLI by using Homebrew already uses a virtual environment, so you don't have to worry about your main Python environment.

Project requires: Python >=3.7



Python Dependencies

Please see requirements.txt file.

External Dependencies

kubectl and Strimzi resources are the tools that Strimzi Kafka CLI uses. These dependencies are automatically downloaded when the first kfk command is run. You can always check the dependency versions of your CLI with the following command:

kfk --version

If you want to change the kubectl and Strimzi resources folder, you can simply change their version with the help of some environment variables in order to let Strimzi Kafka CLI download the version you want, or change the PATH of any if you want to use a custom kubectl or Strimzi binary folder. Current versions are recommended, so use these environment variables at your own risk.

STRIMZI_KAFKA_CLI_BASE_PATH: Set this if you want to have a custom Strimzi Kafka CLI folder. It is ~/.strimzi-kafka-cli as default.

STRIMZI_KAFKA_CLI_STRIMZI_VERSION: Set this if you want to use a different Strimzi version.

STRIMZI_KAFKA_CLI_STRIMZI_PATH: Set this if you want to use a custom Strimzi/AMQ Streams.

STRIMZI_KAFKA_CLI_KUBECTL_VERSION Set this if you want to use a different kubectl version.

STRIMZI_KAFKA_CLI_KUBECTL_PATH: Set this if you want to use a custom kubectl.