// Module included in the following assemblies:
//
// deploying/assembly_deploy-kafka-mirror-maker.adoc

[id='deploying-kafka-mirror-maker-{context}']
= Deploying Kafka MirrorMaker to your Kubernetes cluster

[role="_abstract"]
This procedure shows how to deploy a Kafka MirrorMaker cluster to your Kubernetes cluster using the Cluster Operator.

The deployment uses a YAML file to provide the specification to create a `KafkaMirrorMaker2` resource.
MirrorMaker 2 is based on Kafka Connect and uses its configuration properties. 

Strimzi provides xref:config-examples-{context}[example configuration files].
In this procedure, we use the following example file:

* `examples/mirror-maker/kafka-mirror-maker-2.yaml`

IMPORTANT: If deploying MirrorMaker 2 clusters to run in parallel, using the same target Kafka cluster, each instance must use unique names for internal Kafka Connect topics. 
To do this, xref:con-config-mm2-multiple-instances-{context}[configure each MirrorMaker 2 instance to replace the defaults].  

.Prerequisites

* xref:deploying-cluster-operator-str[The Cluster Operator must be deployed.]

.Procedure

. Deploy Kafka MirrorMaker to your Kubernetes cluster:
+
[source,shell,subs="attributes+"]
----
kubectl apply -f examples/mirror-maker/kafka-mirror-maker-2.yaml
----

. Check the status of the deployment:
+
[source,shell,subs="+quotes"]
----
kubectl get pods -n _<my_cluster_operator_namespace>_
----
+
.Output shows the deployment name and readiness
[source,shell,subs="+quotes"]
----
NAME                                    READY  STATUS   RESTARTS
my-mm2-cluster-mirrormaker2-<pod_id>    1/1    Running  1
----
+
`my-mm2-cluster` is the name of the Kafka MirrorMaker 2 cluster.
+
A pod ID identifies each pod created.
+
With the default deployment, you install a single MirrorMaker 2 pod.
+
`READY` shows the number of replicas that are ready/expected.
The deployment is successful when the `STATUS` displays as `Running`.

[role="_additional-resources"]
.Additional resources

* xref:con-config-mirrormaker2-str[Kafka MirrorMaker cluster configuration]
