// Module included in the following assemblies:
//
// assembly-deploying-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:
+
Use `kubectl edit`:
[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:
        request:
          cpu: "1"
          memory: 500Mi
        limit:
          cpu: "1"
          memory: 500Mi
----

. Apply the new configuration to create or update the resource.
+
Use `kubectl apply`:
[source,shell,subs=+quotes]
kubectl apply -f _kafka.yaml_

.Additional resources

* For more information about the schema of the `resources` object, see xref:type-ResourceRequirements-reference[].
