I would recommend running your application inside a different K8s container to better isolate the broker from any issues inside the application impacting the broker itself.
a
Alex Katebi
07/24/2023, 2:39 PM
Can I run my application service container part of the same Kubernetes cluster that runs Pulsar? Trying to avoid managing two separate K8s clusters.
d
David K
07/24/2023, 5:17 PM
yes. just run it as a different pod and not a container within the broker pod. 😃
a
Alex Katebi
07/24/2023, 5:32 PM
What is the advantage of running another pod on the same node as the broker pod? Thanks!!
c
Chris Bono
07/24/2023, 5:53 PM
Hi @Alex Katebi, same reason David initially pointed out (isolation).
Kubernetes is designed so that pods can come and go (“cattle not pets”). Nodes are an abstraction that may map to a physical or virtual machine and K8S knows best on what/when to schedule what pods on what nodes.
The k8s reference docs ALWAYS explain it better than I can though 🙂