kcp

command module
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

README

KCP CLI

FOSSA Status FOSSA Status

This repository is part of the Confluent organization on GitHub. It is public and open to contributions from the community.

Please see the LICENSE file for contribution terms. Please see the CHANGELOG.md for details of recent updates.


A comprehensive command-line tool for planning and executing Kafka migrations to Confluent Cloud.


Table of Contents

Overview

Mission: Simplify and streamline your Kafka migration journey to Confluent Cloud!

kcp helps you migrate your Kafka setups to Confluent Cloud by providing tools to:

  • Scan scan and identify resources in existing Kafka deployments.
  • Create reports for migration planning and cost analysis.
  • Generate migration assets and infrastructure configurations.
  • Migrate execute end-to-end migrations with real-time offset monitoring and resumable workflows.
Key Features
Feature Description
Multiple Auth Methods Support for SASL-IAM, SASL-SCRAM, TLS, and unauthenticated.
Comprehensive Reporting Detailed migration planning and cost analysis.
Infrastructure as Code Generate Terraform and Ansible configurations to seamlessly migrate to Confluent Cloud.
Migration Execution FSM-driven migration workflow with lag monitoring, gateway fencing, and topic promotion.
Private VPC Deployments Migrate to Confluent Cloud from private networks and isolated environments.
Documentation

The docs for the latest release are available here

Installation

The recommended way to install kcp is by downloading the latest release binary. Instructions for installing the latest release are available in the latest documentation.

Development

Prerequisites
  • Go 1.25+
  • Make
  • Node
  • Yarn
# Clone the repository
git clone https://github.com/confluentinc/kcp.git
cd kcp

# Install to system path (requires sudo)
make install
Build Commands
# Build for current platform
make build

# Build for Linux
make build-linux

# Build for all platforms
make build-all

# Clean build artifacts
make clean
Testing & Quality
# Format go code
make fmt

# Run tests
make test

# Run tests with coverage
make test-cov

# Run tests with coverage and open UI coverage browser
make test-cov-ui
E2E Integration Tests (Migration)

The migration commands have end-to-end tests that run against a real CFK (Confluent for Kubernetes) cluster in Minikube.

Prerequisites:

# Run the full E2E lifecycle: setup → test → teardown
make e2e

This is the recommended way to run E2E tests. Teardown runs automatically when tests finish (pass or fail), so infrastructure won't be left behind.

If you need to run steps individually:

make e2e-setup       # Set up Minikube cluster with CFK, Kafka clusters, Gateway, and cluster link
make ci-e2e-tests    # Run the E2E tests
make e2e-teardown    # Tear down the infrastructure

If infrastructure persisted from a previous run (e.g. laptop sleep, interrupted test), run make e2e-teardown before starting again.

The setup creates a Minikube cluster (kcp-e2e profile) with 4 CPUs and 8 GB RAM, deploys source and destination Kafka clusters, a Gateway, and a cluster link. The kcp binary is built for Linux and runs inside the cluster to avoid TLS/DNS issues.

Setup typically takes 10-15 minutes depending on image pull times. The test timeout is 15 minutes.

Linting & Pre-commit Hooks
# Install golangci-lint
brew install golangci-lint

# Run Go linters
make lint

# Install git pre-commit hooks (runs linters automatically on commit)
make pre-commit-install

Resources and Support

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL