// Module included in the following assemblies:
//
// getting-started.adoc
// assembly-deploying-the-topic-operator.adoc

[id='deploying-the-topic-operator-standalone-{context}']
= Deploying the standalone Topic Operator

Deploying the Topic Operator as a standalone component is more complicated than installing it using the Cluster Operator, but is more flexible.
For instance is can operate _with_ any Kafka cluster, not necessarily one deployed by the Cluster Operator.

.Prerequisites

* An existing Kafka cluster for the Topic Operator to connect to.

.Procedure

. Edit the `install/topic-operator/05-Deployment-strimzi-topic-operator.yaml` resource. You will need to change the following
+
.. The `STRIMZI_KAFKA_BOOTSTRAP_SERVERS` environment variable in `Deployment.spec.template.spec.containers[0].env` should be set to a list of bootstrap brokers in your Kafka cluster, given as a comma-separated list of `_hostname_:‍_port_` pairs.
.. The `STRIMZI_ZOOKEEPER_CONNECT` environment variable in `Deployment.spec.template.spec.containers[0].env` should be set to a list of the Zookeeper nodes, given as a comma-separated list of `_hostname_:‍_port_` pairs. This should be the same Zookeeper cluster that your Kafka cluster is using.
.. The `STRIMZI_NAMESPACE` environment variable in `Deployment.spec.template.spec.containers[0].env` should be set to the {ProductPlatformName} namespace in which you want the operator to watch for  `KafkaTopic` resources.

. Deploy the Cluster Operator.
+
ifdef::Kubernetes[]
On {KubernetesName} this can be done using `kubectl apply`:
+
[source,shell]
kubectl apply -f install/topic-operator
+
endif::Kubernetes[]
On {OpenShiftName} this can be done using `oc apply`:
+
[source,shell]
oc apply -f install/topic-operator

. Verify that the Topic Operator has been deployed successfully.
ifdef::Kubernetes[]
+
On {KubernetesName} this can be done using `kubectl describe`:
+
[source,shell]
kubectl describe deployment strimzi-topic-operator
+
endif::Kubernetes[]
On {OpenShiftName} this can be done using `oc describe`:
+
[source,shell]
oc describe deployment strimzi-topic-operator
+
The Topic Operator is deployed once the `Replicas:` entry shows `1 available`.
+
NOTE: This could take some time if you have a slow connection to the {ProductPlatformName} and the images have not been downloaded before.

.Additional resources

* For more information about the environment variables used to configure the Topic Operator, see xref:topic-operator-environment-deploying[].
* For more information about getting the Cluster Operator to deploy the Topic Operator for you, see xref:deploying-the-topic-operator-using-the-cluster-operator-str[].
