Skip to content

Maksim-Gr/kkon

Repository files navigation

kkon

Go Go Report Card Go Version Latest Release Go Reference


A command-line interface for managing Kafka Connect connectors via the Kafka Connect REST API. kkon focuses on providing a fast, simple, and interactive CLI experience for day-to-day connector operations.

kkon demo — health-check and connector list

Overview

kkon is a Go-based CLI tool designed to interact with Kafka Connect clusters. It creates a lightweight client for the Kafka Connect REST API and exposes common connector management operations through an intuitive command-line interface.

The tool is intended for developers and operators who want a straightforward way to list, inspect, back up, create, and delete connectors without manually interacting with REST endpoints.


Features

  • List running Kafka Connect connectors with live status badges (RUNNING / FAILED / PAUSED)
  • View connector configurations
  • Create connectors from predefined templates (RabbitMQ, S3 Sink, JDBC, Debezium Postgres)
  • Delete existing connectors
  • Update connector configuration with a before→after diff view
  • Back up connector configurations to JSON files
  • Health-check with per-task error trace preview for failed tasks
  • Interactive CLI prompts (arrow-key navigation, cancel option on every prompt)
  • Connection test after saving credentials
  • Basic auth support
  • Simple configuration-driven setup
  • JSON output for all read commands (--output json)

Installation

Download a release (recommended)

Download the latest binary for your platform from the Releases page, then make it executable:

chmod +x kkon
mv kkon /usr/local/bin/kkon

Install with Go

go install github.com/Maksim-Gr/kkon@latest

Build from source

git clone https://github.com/Maksim-Gr/kkon.git
cd kkon
go build -o kkon

Configuration

On first run kkon will prompt you to configure a Kafka Connect endpoint. You can also run configuration manually at any time:

kkon config set

Config file location:

Platform Path
Linux / macOS ~/.config/kkon/config.yaml
Windows %USERPROFILE%\.config\kkon\config.yaml

Example config:

kafkaConnect:
  url: http://localhost:8083
  username: ""
  password: ""

Usage

kkon --help

Connector commands

kkon connector list                      # List connectors with status badges
kkon connector create                    # Create from template (RabbitMQ, S3 Sink, JDBC, Debezium Postgres)
kkon connector create -f connector.json  # Create from JSON file
kkon connector update                    # Update connector config (shows before→after diff)
kkon connector delete [name]             # Delete a connector (interactive, or pass a name)
kkon connector delete my-conn --yes      # Delete without the confirmation prompt (scriptable)
kkon connector pause [name]              # Pause a connector and its tasks
kkon connector resume [name]             # Resume a paused connector
kkon connector restart [name]            # Restart a connector (and its tasks)
kkon connector restart [name] --only-failed     # Restart only FAILED connector and tasks
kkon connector health-check              # Show connector and task statuses with error traces

delete, pause, resume, and restart take an optional connector name — omit it to pick interactively. delete and restart accept --yes/-y to skip the confirmation prompt (for scripting). restart restarts tasks by default (--include-tasks); use --only-failed to restart only failed connectors/tasks.

Task commands

kkon task list -c <name>      # List tasks for a connector
kkon task get  -c <name>      # Get task status
kkon task restart -c <name>   # Restart a task

Config commands

kkon config set               # Set Kafka Connect URL and credentials
kkon config show              # Display current configuration
kkon connector backup         # Backup all connector configs to JSON
kkon connector backup --dir ./backup

Global flags

--dry-run, -d        Preview actions without making any API calls
--output, -o <fmt>   Output format: text (default) or json

Backup Example

The backup command retrieves all connector configurations from the Kafka Connect cluster and stores them in a timestamped JSON file:

kkon connector backup --dir ./backup

This allows connector configurations to be versioned, reviewed, or restored later.


Roadmap

  • Additional connector templates
  • Table output format (--output table)

Project Status

kkon is stable and actively used for connector lifecycle management. Releases follow semantic versioning (v1.x); new connector templates and API features continue to be added in backward-compatible minor releases.


Contributing

Contributions, bug reports, and feature requests are welcome.

  • Check open issues before submitting a duplicate
  • Fork the repository and open a pull request against main
  • Follow the existing code style (gofmt, go vet)
  • Integration tests require Docker; run make test

References

About

kkon — a fast CLI to manage Kafka Connect connectors via the REST API

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors