// This assembly is included in the following assemblies:
//
// getting-started.adoc

// Save the context of the assembly that is including this one.
// This is necessary for including assemblies in assemblies.
// See also the complementary step on the last line of this file.

[id='kafka-cluster-{context}']
= Kafka cluster

When installing Kafka, {ProductName} also installs a Zookeeper cluster and adds the necessary configuration to connect Kafka with Zookeeper.

{ProductName} provides two options for Kafka cluster deployment:

Ephemeral:: is suitable only for development and testing purposes and not for production. This deployment uses `emptyDir` volumes for storing broker information (Zookeeper) and topics or partitions
(Kafka). Using an `emptyDir` volume means that its content is strictly related to the pod life cycle and is deleted when the pod goes down.

Persistent:: uses `PersistentVolumes` to store Zookeeper and Kafka data. The `PersistentVolume` is
acquired using a `PersistentVolumeClaim` to make it independent of the actual type of the `PersistentVolume`. For example, it can use
ifdef::Kubernetes[HostPath volumes on Minikube or]
Amazon EBS volumes in Amazon AWS deployments without any changes in the YAML files. The `PersistentVolumeClaim` can use a `StorageClass` to trigger automatic volume provisioning.

ifdef::Kubernetes[]
include::proc-deploying-kafka-cluster-kubernetes.adoc[leveloffset=+1]
endif::Kubernetes[]

include::proc-deploying-kafka-cluster-openshift.adoc[leveloffset=+1]
