// Module included in the following assemblies:
//
// assembly-kafka-cluster.adoc

[id='deploying-kafka-cluster-kubernetes-{context}']
= Deploying the Kafka cluster to {KubernetesName}

The following procedure describes how to deploy an ephemeral or persistent Kafka cluster to {KubernetesName} on the command line.

.Prerequisites

* The Cluster Operator is deployed.

.Procedure

. If you plan to use the cluster for development or testing purposes, you can create and deploy an ephemeral cluster using `kubectl apply`.
+
[source,shell]
----
kubectl apply -f examples/kafka/kafka-ephemeral.yaml
----

. If you plan to use the cluster in production, create and deploy a persistent cluster using `kubectl apply`.
+
[source,shell]
----
kubectl apply -f examples/kafka/kafka-persistent.yaml
----

.Additional resources
* For more information on deploying the Cluster Operator, see xref:cluster-operator-str[].
* For more information on the different configuration options supported by the `Kafka` resource, see xref:assembly-deployment-configuration-kafka-str[].
