// Module included in the following assemblies:
//
// assembly-using-the-topic-operator.adoc

[id='proc-topic-operator-with-resource-requests-limits-{context}']
= Configuring the Topic Operator with resource requests and limits

You can allocate resources, such as CPU and memory, to the Topic Operator and set a limit on the amount of resources it can consume.

.Prerequisites

* The Cluster Operator is running.

.Procedure

. Update the Kafka cluster configuration in an editor, as required:
+
[source,shell,subs=+quotes]
----
kubectl edit kafka _MY-CLUSTER_
----

. In the `spec.entityOperator.topicOperator.resources` property in the `Kafka` resource, set the resource requests and limits for the Topic Operator.
+
[source,yaml,subs=attributes+]
----
apiVersion: {KafkaApiVersion}
kind: Kafka
spec:
  # Kafka and ZooKeeper sections...
  entityOperator:
    topicOperator:
      resources:
        requests:
          cpu: "1"
          memory: 500Mi
        limits:
          cpu: "1"
          memory: 500Mi
----

. Apply the new configuration to create or update the resource.
+
[source,shell,subs=+quotes]
kubectl apply -f _KAFKA-CONFIG-FILE_