// Module included in the following assemblies:
//
// assembly-node-scheduling.adoc
// assembly-dedicated-nodes.adoc

[id='affinity-{context}']
= Affinity

Affinity can be configured using the `affinity` property in following resources:

* `Kafka.spec.kafka.template.pod`
* `Kafka.spec.zookeeper.template.pod`
* `Kafka.spec.entityOperator.template.pod`
* `KafkaConnect.spec.template.pod`
* `KafkaConnectS2I.spec.template.pod`
* `KafkaBridge.spec.template.pod`

The affinity configuration can include different types of affinity:

* Pod affinity and anti-affinity
* Node affinity

The format of the `affinity` property follows the Kubernetes specification.
For more details, see the {K8sAffinity}.
