Confluent kubectl plugin
The Confluent for Kubernetes (CFK) bundle contains a Confluent kubectl plugin for interacting with Confluent for Kubernetes. The plugin supports Linux, Windows, and macOS. For more information, see Confluent plugin.
Install Confluent kubectl plugin
Step 1: Download and unpack the CFK bundle
If you deployed CFK using the Helm repository, download and unpack the CFK bundle as described in Step 1 of the download bundle procedure.
If you deployed CFK using the download bundle, skip this step.
Step 2: Remove any older plugin (upgrades only)
If you are upgrading from an older version of the Confluent plugin, delete the old plugin from the directory where you installed it.
Step 3: Check your machine architecture
Check the arm64 or amd64 architecture of the machine:
arch
Expected: Your machine’s architecture, for example, arm64 or amd64.
Step 4: Unpack the plugin
From the directory where you deployed CFK, unpack the kubectl plugin that
matches your client environment (Linux, Windows, or Mac OS/Darwin) into your
local executables directory. On Mac OS and Linux, the directory is
/usr/local/bin/.
This allows the standard kubectl command-line tool to find the plugin. Use
the architecture you retrieved in the previous step (amd64 or arm64):
tar -xvf kubectl-plugin/kubectl-confluent-<environment>-<architecture>.tar.gz \
-C <local directory for the plugin>
For example, on Mac OS with the arm64 architecture type:
tar -xvf kubectl-plugin/kubectl-confluent-darwin-arm64.tar.gz \
-C /usr/local/bin/
Expected: x kubectl-confluent
Note
If /usr/local/bin/ is not writable by your user, prefix the command
with sudo.
Verify the plugin is available through kubectl:
kubectl confluent --help
Expected: The help output for the confluent plugin, listing the available
commands. For example, cluster, kraft, and connector.
Install Confluent plugin using Krew
Krew is the plugin manager for kubectl. To install the Confluent kubectl plugin
using Krew, complete the following steps:
Step 1: Install Krew
Install Krew as described in the Krew User Guide.
Step 2: Download and unpack the CFK bundle
If you deployed CFK using the Helm repository, download and unpack the CFK bundle as described in Step 1 of the download bundle procedure.
If you deployed CFK using the download bundle, skip this step.
Step 3: Go to the plugin directory
Go to the kubectl-plugin sub-directory under the directory where you
unpacked the CFK bundle.
Step 4: Remove any older plugin (upgrades only)
If you are upgrading from an older version of the Confluent plugin, delete the old plugin:
kubectl krew uninstall confluent
Step 5: Install the plugin
Check the arm64 or amd64 architecture of the machine:
arch
Expected: Your machine’s architecture, for example, arm64 or amd64.
Using the architecture you retrieved (amd64 or arm64), install the
plugin based on the OS and its architecture type:
kubectl krew install \
--manifest=confluent-platform.yaml \
--archive=kubectl-confluent-<environment>-<architecture>.tar.gz
For example, to install the plugin on Mac OS with the arm64 architecture
type:
kubectl krew install \
--manifest=confluent-platform.yaml \
--archive=kubectl-confluent-darwin-arm64.tar.gz
Expected: Installed plugin: confluent