-
Hello, I have a Kubernetes cluster that consists on 1 master node and 2 workers. When I deploy a Kafka cluster with 3 zookeeper replicas and 3 kafka replicas, I have noticed that the zookeeper pods are properly spread among all nodes, but, that's not the case for the kafka pods, they are all in the same node. Why is that? Are pods automatically distributed? Is there a logic behind it? For example:
Doing the same in a cluster with 3 workers I get something like this:
Thank you in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
By default, Kubernetes schedules the pods as it fits. So it can be affected by many aspects => available capacity, storage, etc. If you want, the Kafka custom resource allows you to configure affinity or topology spread constraints to better tell Kubernetes what your desired state is and control the scheduling through it. |
Beta Was this translation helpful? Give feedback.
By default, Kubernetes schedules the pods as it fits. So it can be affected by many aspects => available capacity, storage, etc. If you want, the Kafka custom resource allows you to configure affinity or topology spread constraints to better tell Kubernetes what your desired state is and control the scheduling through it.