:_mod-docs-content-type: REFERENCE

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

[id='ref-kafka-entity-operator-{context}']
= Configuring the Entity Operator

[role="_abstract"]
Use the `entityOperator` property in `Kafka.spec` to configure the Entity Operator.
The Entity Operator is responsible for managing Kafka-related entities in a running Kafka cluster. It comprises the following operators:

* Topic Operator to manage Kafka topics
* User Operator to manage Kafka users

By configuring the `Kafka` resource, the Cluster Operator can deploy the Entity Operator, including one or both operators. 
Once deployed, the operators are automatically configured to handle the topics and users of the Kafka cluster. 

Each operator can only monitor a single namespace.
For more information, see xref:con-operators-namespaces-str[].

The `entityOperator` property supports several sub-properties:

* `topicOperator`
* `userOperator`
* `template`

The `template` property contains the configuration of the Entity Operator pod, such as labels, annotations, affinity, and tolerations.
For more information on configuring templates, see xref:assembly-customizing-kubernetes-resources-str[].

The `topicOperator` property contains the configuration of the Topic Operator.
When this option is missing, the Entity Operator is deployed without the Topic Operator.

The `userOperator` property contains the configuration of the User Operator.
When this option is missing, the Entity Operator is deployed without the User Operator.

For more information on the properties used to configure the Entity Operator, see the link:{BookURLConfiguring}#type-EntityOperatorSpec-reference[`EntityOperatorSpec` schema reference^].

.Example of basic configuration enabling both operators
[source,yaml,subs=attributes+]
----
apiVersion: {KafkaApiVersion}
kind: Kafka
metadata:
  name: my-cluster
spec:
  kafka:
    # ...
  entityOperator:
    topicOperator: {}
    userOperator: {}
----

If an empty object (`{}`) is used for the `topicOperator` and `userOperator`, all properties use their default values.

When both `topicOperator` and `userOperator` properties are missing, the Entity Operator is not deployed.
