April 21, 2022·4 min read·engineeringkafkaconfluentclitooling

Confluent CLI v2 gives cloud and platform commands a shared context model

The unified CLI absorbs ccloud commands and makes context switching explicit. Its hybrid workflow still needs distinct identities, cluster selections and replication configuration on each side.

Managing a stream across hosted and self-managed deployments requires more than moving records between brokers. The operator also changes credentials and administrative endpoints. Confluent CLI v2 brings the former ccloud functionality into the confluent command, giving those operations a common interface. Confluent's April 21 explanation focuses on a workflow linking Confluent Platform with Confluent Cloud.

The useful change is the context model around that interface. A context records login state and associated settings that persist between commands. One executable can now operate on both products, so selecting the intended context becomes an explicit part of the operation. The shared command name does not make the two administrative environments interchangeable.

I value Kafka's ability to retain history for independent consumers. Moving that history between environments introduces another set of operational identities. A CLI that exposes those identities through named contexts is useful because an operator can state which environment a command should address.

Login selects a platform

The announcement says confluent login authenticates to Confluent Cloud by default. Supplying a Metadata Service URL selects Confluent Platform instead. Its examples show the distinction directly.

confluent login
confluent login --url https://example.com:8090

These commands establish different login destinations. They should not be read as two equivalent spellings of the same request. The endpoint argument determines which administrative system handles the second login.

After login, the available command set reflects the platform. The announcement shows API-key and environment commands for Cloud, while the Platform list includes cluster metadata and secrets commands. Shared names such as kafka exist within that selected administrative context. A unified executable can still present capabilities specific to the target product.

The versioned CLI README describes managing both Confluent Cloud and Platform from the terminal. It also documents installation of specific versions. That provides a concrete way to identify the implementation used by a scripted workflow instead of describing it only as the unified CLI.

Context is promoted into the main command hierarchy

Confluent promotes context to a top-level command in V2. The announcement demonstrates listing contexts and assigning a useful name before selecting one.

confluent context list
confluent context update --name cloud
confluent context use cloud

Naming is relevant when several contexts have similar generated identifiers. An operator can refer to the intended administrative environment through an explicit selection. That reduces ambiguity in a procedure that moves repeatedly between cloud and platform tasks.

The announcement also describes confluent prompt, which can display the active context in the shell prompt. This gives a user visible feedback about the current selection before the next command. It does not independently select the Kafka cluster or provision credentials. Its role is to expose context already maintained by the CLI.

My preference is for that state to remain visible during interactive work. The same subcommand can have different consequences after a context change. Showing the selection makes the command's surrounding assumptions easier to inspect before it runs.

Linking clusters still requires both sides

The hybrid example uses a source-initiated link from Confluent Platform to Cloud. The source makes an outbound connection to the destination, and the setup creates a corresponding half of the link in each environment. Switching CLI contexts supports those two administrative operations without replacing the replication configuration itself. The tutorial requires CLI 2.6.1 or later and a Platform deployment with Metadata Service and LDAP configured. Those prerequisites identify the particular environment in which the demonstrated commands operate, rather than a procedure for every Kafka installation.

The destination configuration identifies destination mode with an inbound connection. The source configuration identifies source mode and an outbound connection. It also supplies connection and authentication information for the Cloud destination, with separately prefixed local properties for the Platform side.

This is a useful limit on the unification claim. One command interface simplifies how an operator reaches the two control systems. It does not eliminate the difference between source identity and destination identity or infer the network direction. The tutorial expresses those facts in the link configuration.

The example then creates a mirror topic in Cloud and produces into the Platform topic while consuming from the destination. Those steps demonstrate a specific data path across the configured link. A successful CLI login alone would establish neither replication nor the availability of mirrored records.

Scripts need an identified CLI generation

The announcement says Cloud users moving from ccloud V1 receive syntax changes and multi-organization support. It also announces a May 9 sunset for ccloud. That is the stated transition plan as of this post, with breaking changes documented separately by Confluent.

For a maintained script, the relevant inputs now include the CLI version and selected context alongside the command arguments. The unified tool reduces the number of executables involved in a hybrid procedure. Its named context model keeps the administrative destination explicit while the source and destination clusters retain their separate configuration and authentication requirements.