Confluent for Kubernetes Quickstart¶
Prerequisites¶
- A Kubernetes cluster conforming to one of the supported versions.
- kubectl installed,
initialized, with the context set. You also must have the
kubeconfig
file configured for your cluster. - Helm 3 installed.
- Access to the Confluent for Kubernetes bundle.
- For this quick start guide, your Kubernetes cluster is assumed to have a default dynamic storage provisioner.
Step 1: Create a namespace¶
Create the namespace to use.
kubectl create namespace confluent
Set this namespace to default for your Kubernetes context.
kubectl config set-context --current --namespace confluent
Step 2: Install Confluent for Kubernetes¶
Add the Confluent for Kubernetes Helm repository.
helm repo add confluentinc https://packages.confluent.io/helm helm repo update
Install Confluent for Kubernetes.
helm upgrade --install confluent-operator confluentinc/confluent-for-kubernetes
Step 3: Install Confluent Platform¶
Install all Confluent Platform components.
kubectl apply -f https://raw.githubusercontent.com/confluentinc/confluent-kubernetes-examples/master/quickstart-deploy/confluent-platform.yaml
Install a sample producer app and topic.
kubectl apply -f https://raw.githubusercontent.com/confluentinc/confluent-kubernetes-examples/master/quickstart-deploy/producer-app-data.yaml
Check that everything is deployed:
kubectl get pods
Step 4: View Control Center¶
Use Control Center to monitor the Confluent Platform, and see the created topic and data.
Set up port forwarding to Control Center web UI from local machine:
kubectl port-forward controlcenter-0 9021:9021
Browse to Control Center:
Check that the
elastic-0
topic was created and that messages are being produced to the topic.
Bonus: Install and use Confluent kubectl plugin¶
The Confluent for Kubernetes (CFK) bundle contains a Confluent kubectl plugin for interacting with Confluent for Kubernetes.
Download the CFK bundle using the following command, and unpack the downloaded bundle:
curl -O https://packages.confluent.io/bundle/cfk/confluent-for-kubernetes-2.2.4.tar.gz
Unpack the kubectl plugin that matches your client environment, Linux, Windows or Mac OS (Darwin), into your client environment local executables directory. On Mac OS and Linux, this would be
/usr/local/bin/
. This will allow the standard CLIkubectl
to find the plugin.tar -xvf kubectl-plugin/kubectl-confluent-<environment>-amd64.tar.gz \ -C <local directory for the plugin>
For example, on Mac OS:
tar -xvf kubectl-plugin/kubectl-confluent-darwin-amd64.tar.gz \ -C /usr/local/bin/
Open Confluent Control Center.
kubectl confluent dashboard controlcenter
View the Confluent Platform version
kubectl confluent version