Skip to main content

Command Line Interface for Strimzi Kafka Operator

Project description

Build Deploy PyPI version

strimzi cli

Strimzi Kafka CLI

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

Intention here is to ramp up Strimzi usage by creating a similar CLI experience with traditional Apache Kafka binaries. For example:

Native Command Strimzi CLI Command
$KAFKA_HOME/bin/kafka-topics.sh kfk topics
$KAFKA_HOME/bin/kafka-configs.sh kfk configs
$KAFKA_HOME/bin/kafka-console-consumer.sh kfk console-consumer
... ...

kfk command stands for the usual kafka-* prefix of the Apache Kafka runnable files which are located in bin directory. There are options provided like topics, console-consumer, etc. which also mostly stand for the rest of the runnable file names like kafka-topic.sh.

However, because of the nature of Strimzi and its capabilities, there are also unusual options like clusters which is used for cluster configuration or users which is used for user management and configuration.

Following is the high-level output of the Strimzi Kafka CLI:

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

  Strimzi Kafka CLI

Options:
  --help  Show this message and exit.

Commands:
  acls              This tool helps to manage ACLs on Kafka.
  clusters          The kafka cluster(s) to be created, altered or...
  configs           Add/Remove entity config for a topic, client, user or...
  console-consumer  The console consumer is a tool that reads data from...
  console-producer  The console producer is a tool that reads data from...
  operator          Install/Uninstall Strimzi Kafka Operator
  topics            The kafka topic(s) to be created, altered or described.
  users             The kafka user(s) to be created, altered or described.
  version           Prints the version of Strimzi Kafka CLI

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

Installation

Strimzi Kafka CLI can be installed via pip (python package installer).

sudo pip install strimzi-kafka-cli

IMPORTANT

We recommend to use sudo while installing Strimzi Kafka CLI because the binary will directly be located in /usr/local/bin which is accessible from all users of the OS. If you don't want this, and want to install the CLI without sudo you will get this kind of warning:

WARNING: The script kfk is installed in '[USER_HOME]/[PYTHON_PATH]/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

So in this case you need to put the shown location of kfk on PATH.


Project requires: Python >=3.5

Examples

You can access the examples from here.

Dependencies

Python Dependencies

Please see requirements.txt file.

External Dependencies

  • kubectl: kfk will automatically download kubectl binary which is configurable to use which kubectl version to use. (Pls see issue-19)
  • Strimzi binaries: kfk will download it automatically. The yaml templates are used for create actions. This is configurable to use which binaries path to use. (Pls see issue-19)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

strimzi-kafka-cli-0.1.0a34.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

strimzi_kafka_cli-0.1.0a34-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file strimzi-kafka-cli-0.1.0a34.tar.gz.

File metadata

  • Download URL: strimzi-kafka-cli-0.1.0a34.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for strimzi-kafka-cli-0.1.0a34.tar.gz
Algorithm Hash digest
SHA256 b603b3a3f1cde3f62fceee51bcd4984f66196f9fc22f61052c7a4b5b485af6f4
MD5 e893bd638975cf8730b40d5b5b9be98b
BLAKE2b-256 d43ef58440a2419ff5620e63fe98de2f5d193fac8ce51a8b9a125d748a5c9f70

See more details on using hashes here.

File details

Details for the file strimzi_kafka_cli-0.1.0a34-py3-none-any.whl.

File metadata

  • Download URL: strimzi_kafka_cli-0.1.0a34-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for strimzi_kafka_cli-0.1.0a34-py3-none-any.whl
Algorithm Hash digest
SHA256 ea9fd73b8eeaddc14a73fa0343e66fa1302b2a344718219a3b71e8ca697b9a82
MD5 03eec94142e96ba03ac6b2eabc2d2b3e
BLAKE2b-256 02e795a9e17822e86fbfb639413cc6d9ff136eaf32a32f8ef04ea2a7b852f6f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page