Pod placement

You can configure Pod placement for Kafka brokers as described in Pod placement.

By default, the operator configures the following Pod placement constraints:

affinity:
  podAntiAffinity:
    preferredDuringSchedulingIgnoredDuringExecution:
    - podAffinityTerm:
        labelSelector:
          matchLabels:
            app.kubernetes.io/component: broker
            app.kubernetes.io/instance: cluster-name
            app.kubernetes.io/name: kafka
        topologyKey: kubernetes.io/hostname
      weight: 70

In the example above cluster-name is the name of the Kafka custom resource that owns this Pod.