CONFLUENT CLOUD CLI
You can use the Confluent Cloud CLI to administer your Confluent Cloud cluster.
The Confluent Cloud CLI requires users to log in with a Confluent Cloud user account.
All Confluent Cloud CLI traffic is over https.
https
Important
The Confluent Cloud CLI only supports basic produce or consume operations. For example, you cannot pass in a properties file using the Confluent Cloud CLI. This means you cannot set other configuration properties or produce with keys. For advanced produce or consume operations, use the Confluent CLI confluent local services kafka produce and confluent local services kafka consume commands with the --cloud --config <path-to-file> flag.
confluent local services kafka produce
confluent local services kafka consume
--cloud --config <path-to-file>
The Confluent Cloud CLI is supported for macOS, Microsoft Windows, and Linux (including Alpine) operating systems.
Note
On Microsoft Windows, an appropriate Linux environment may need to be installed in order to have the curl and sh commands available, such as the Windows Subsystem for Linux.
curl
sh
Download the Confluent Cloud CLI in the <path-to-cli> directory:
<path-to-cli>
The script detects which system is running and downloads the appropriate binary.
curl -L --http1.1 https://cnfl.io/ccloud-cli | sh -s -- -b <path-to-cli>
Add the CLI installation location to your PATH environment variable.
PATH
Verify installation by typing ccloud in your terminal.
ccloud
You should see Confluent Cloud CLI usage information:
Welcome to the Confluent Cloud CLI Usage: ccloud [command] Available Commands: api-key Manage API keys completion Output shell completion code environment Manage and select ccloud environments help Help about any command kafka Manage Kafka login Login to Confluent Cloud logout Logout of Confluent Cloud service-account Manage service accounts update Update ccloud version Print the ccloud version Flags: -h, --help help for ccloud -v, --verbose count increase output verbosity --version version for ccloud
Log in to your Confluent Cloud cluster using the following command:
ccloud login
View your cluster using the following command:
ccloud kafka cluster list
Your output should resemble:
Id | Name | Provider | Region | Durability | Status +-------------+-------------------+----------+-------------+------------+--------+ lkc-emmox | My first cluster | gcp | us-central1 | LOW | UP lkc-low0y | My second cluster | gcp | us-central1 | LOW | UP
Designate the active cluster using the following command:
ccloud kafka cluster use lkc-emmox
Connect Confluent Cloud CLI to a Cluster.
Run these commands to uninstall the Confluent Cloud CLI. These commands assume you have installed the CLI in the /usr/local/bin folder.
/usr/local/bin
rm -rf ~/.ccloud/ sudo rm /usr/local/bin/ccloud
You can uninstall versions of the Confluent Cloud CLI prior to 0.78.x with these instructions. You can check the version of the Confluent Cloud CLI with the ccloud version command.
ccloud version
Tip
Confluent Cloud CLI versions prior to 0.78.x stored their configuration in .ccloud/config. This file is no longer used and can be deleted. For more information, see Login and Configuration.
.ccloud/config
Run this command from your terminal:
brew uninstall ccloud
Delete the Confluent Cloud CLI files and folder from your system. For example:
rm -rf <path-to-ccloud-cli>/ccloud-0.2.1
Remove the entry from your PATH environment variable.
Remove the entry from your JAVA_HOME environment variable.
JAVA_HOME
To install a previous version of the Confluent Cloud CLI, see the 5.2.0 CLI documentation.