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

[id='using-the-topic-operator-{context}']
= Using the Topic Operator

[role="_abstract"]
The `KafkaTopic` resource configures topics, including partition and replication factor settings. 
When you create, modify, or delete a topic using `KafkaTopic`, the Topic Operator ensures that these changes are reflected in the Kafka cluster.

For more information on the `KafkaTopic` resource, see the link:{BookURLConfiguring}#type-KafkaTopic-reference[`KafkaTopic` schema reference^].

.Deploying the Topic Operator

You can deploy the Topic Operator using the Cluster Operator or as a standalone operator.
You would use a standalone Topic Operator with a Kafka cluster that is not managed by the Cluster Operator.

For deployment instructions, see the following:

* xref:deploying-the-topic-operator-using-the-cluster-operator-{context}[Deploying the Topic Operator using the Cluster Operator (recommended)]
* xref:deploying-the-topic-operator-standalone-{context}[Deploying the standalone Topic Operator]

[IMPORTANT]
====
To deploy the standalone Topic Operator, you need to set environment variables to connect to a Kafka cluster.
These environment variables do not need to be set if you are deploying the Topic Operator using the Cluster Operator as they will be set by the Cluster Operator.
====

//modes of topic creation
include::../../modules/operators/ref-operator-topic.adoc[leveloffset=+1]
//topic naming conventions
include::../../modules/operators/con-operator-topic-names.adoc[leveloffset=+1]
include::../../modules/operators/con-application-topic-handling.adoc[leveloffset=+1]
include::../../modules/operators/proc-configuring-kafka-topic.adoc[leveloffset=+1]
include::../../modules/operators/con-topic-replication.adoc[leveloffset=+1]
//converting managed topics to make changes to KafkaTopic resources
include::../../modules/operators/proc-converting-managed-topics.adoc[leveloffset=+1]
//converting non-managed topics so they are managed by KafkaTopic resources
include::../../modules/operators/proc-converting-non-managed-topics.adoc[leveloffset=+1]
//deleting managed topics
include::../../modules/operators/con-deleting-managed-topics.adoc[leveloffset=+1]
include::../../modules/operators/proc-topic-operator-with-resource-requests-limits.adoc[leveloffset=+1]
