Quick Start with ZooKeeper
Deploy Confluent Platform with ZooKeeper using Confluent for Kubernetes by following these steps. This quick start works with Confluent Platform 7.9 and earlier versions.
Important
Starting with Confluent Platform version 8.0, ZooKeeper is no longer part of Confluent Platform.
Prerequisites
A Kubernetes cluster conforming to one of the supported versions.
kubectl installed, initialized, with the context set. You must also have the
kubeconfigfile configured for your cluster.Helm 3 installed.
Access to the Confluent for Kubernetes bundle.
A Kubernetes cluster with a default dynamic storage provisioner enabled.
Step 1: Set the quick start home directory
Set an environment variable to point to the location of the quick start custom resource (CR) files:
export QUICKSTART_HOME="https://raw.githubusercontent.com/confluentinc/confluent-kubernetes-examples/master/quickstart-deploy"
Step 2: Create a namespace
Create the namespace:
kubectl create namespace confluent
Expected: Your terminal prints the success message
namespace/confluent created.Set the namespace to default for your Kubernetes context:
kubectl config set-context --current --namespace confluent
Expected: Your terminal prints
Context "<your-context-name>" modified.
Step 3: Install Confluent for Kubernetes
Add the Confluent for Kubernetes Helm repository:
helm repo add confluentinc https://packages.confluent.io/helm
Expected: Your terminal prints
"confluentinc" has been added to your repositories.Update the Helm repository:
helm repo update
Expected: Your terminal prints
Update Complete. Happy Helming!Install Confluent for Kubernetes:
helm upgrade --install \ confluent-operator confluentinc/confluent-for-kubernetes
Expected: Your terminal prints
Release "confluent-operator" does not exist. Installing it now., followed bySTATUS: deployed.Check that the CFK pod starts:
kubectl get pods
Expected: The
confluent-operatorpod shows1/1underREADYandRunningunderSTATUS.
Step 4: Install Confluent Platform
Install all Confluent Platform components:
kubectl apply -f $QUICKSTART_HOME/confluent-platform.yaml
Expected: One
<kind>.platform.confluent.io/<name> createdline per resource, for example,zookeeper.platform.confluent.io/zookeeper created.Install the sample producer application and topic:
kubectl apply -f $QUICKSTART_HOME/producer-app-data.yaml
Expected: Your terminal prints
secret/kafka-client-config created,statefulset.apps/elastic created,service/elastic created, andkafkatopic.platform.confluent.io/elastic-0 created.Wait until all the Confluent Platform pods deploy and run:
kubectl get pods
Expected: Every pod shows a matching ready count, such as
1/1, underREADYandRunningunderSTATUS. This can take a few minutes.In this quick start, the following components are being deployed: ZooKeeper, Apache Kafka®, Connect, Schema Registry, ksqlDB, REST Proxy, Confluent Control Center (Legacy).
Step 5: View Confluent Control Center (Legacy)
Use Confluent Control Center (Legacy) to monitor Confluent Platform, and view the created topic and data.
Set up port forwarding to Control Center (Legacy) web UI from your local machine:
kubectl port-forward controlcenter-0 9021:9021
Expected: Your terminal prints
Forwarding from 127.0.0.1:9021 -> 9021.Browse to Control Center (Legacy) at:
Expected: The Confluent Control Center (Legacy) UI loads in your browser.
Check that the
elastic-0topic is created and the messages are being produced to the topic.Optionally, you can try other tasks, such as adding or uploading your connectors. For details, see Install connector plugin.
Step 6: Tear down
Shut down the sample producer application:
kubectl delete -f $QUICKSTART_HOME/producer-app-data.yaml
Expected: Your terminal prints
secret "kafka-client-config" deleted from <namespace> namespace,statefulset.apps "elastic" deleted from <namespace> namespace,service "elastic" deleted from <namespace> namespace, andkafkatopic.platform.confluent.io "elastic-0" deleted from <namespace> namespace.Shut down the Confluent Platform clusters:
kubectl delete -f $QUICKSTART_HOME/confluent-platform.yaml
Expected: One
<kind>.platform.confluent.io "<name>" deleted from <namespace> namespaceline per resource.Shut down the CFK:
helm uninstall confluent-operator
Expected: Your terminal prints
release "confluent-operator" uninstalled.Delete the namespace:
kubectl delete namespace confluent
Expected: Your terminal prints
namespace "confluent" deleted.
Next steps
To install and use the Confluent kubectl plugin, see Quick Start to Install Confluent kubectl Plugin.