Skip to content
Jimmy Bonds edited this page Dec 20, 2018 · 10 revisions

kafkactl

Quickstart:

  • Download the latest kafkactl tool and extract to a $PATH directory.

  • Run "kafkactl config --sample" to generate a sample config at $HOME/.kafkactl.yaml

  • Edit the config file and save.

  • Alternatively, pass all arguments to the command when running.

# kafkactl --broker brokerhost01:9092 admin create --topic newtopic01 --partitions 15 --rfactor 3

example config commands

kafkactl config --sample
kafkactl config --show
kafkactl config --use testcluster1

example config file (~/.kafkactl.yaml)

current: testCluster1
entries:
- name: testCluster1
  kafka:
  - brokerHost1:9092
  - brokerHost2:9092
  burrow:
  - http://burrow1:3000
  - http://burrow2:3000
  zookeeper:
  - http://zk1:2181
  - http://zk2:2181
- name: testCluster2
  kafka:
  - brokerHost1:9092
  - brokerHost2:9092
  burrow:
  - http://burrow1:3000
  - http://burrow2:3000
  zookeeper:
  - http://zk1:2181
  - http://zk2:2181

Show Cluster Details / Config:

  • Running "kafkactl config" without any arguments will show the current context or entry:
# > kafkactl config

CURRENT:
name: atl-dc
kafka:
- atl-dc-kafka01:9092
- atl-dc-kafka02:9092
- atl-dc-kafka03:9092
- atl-dc-kafka04:9092
- atl-dc-kafka05:9092
burrow:
- http://atl-dc-burrow:9000
zookeeper:
- atl-dc-kafka01:2181
- atl-dc-kafka01:2181
  • Running "kafkactl" alone will give you a high level overview of your cluster:
# > kafkactl

Brokers:  5
 Topics:  3
 Groups:  0

Cluster: (Kafka: v1.1)
* atl-dc-kafka01.jbvm.io:9092/1
  atl-dc-kafka02.jbvm.io:9092/2
  atl-dc-kafka03.jbvm.io:9092/3
  atl-dc-kafka04.jbvm.io:9092/4
  atl-dc-kafka05.jbvm.io:9092/5

(*)Controller

More

Clone this wiki locally