Best Practices for Running Kafka and PostgreSQL on On-Prem Kubernetes

April 20, 2026 5 answers
Asked by !choir row 3
I'm currently using an on-prem Kubernetes cluster (rke2) primarily for stateless workloads, but I'm considering adding stateful workloads like Kafka and PostgreSQL. My main concern is storage management. I don't have much confidence in using NFS for databases, and tying storage to my hypervisor (currently VMware, planning to switch to Proxmox) feels risky in the long run. I'm wondering if it's feasible to use local storage as a CSI driver since Kafka and PostgreSQL handle data replication at the application level. Should I dedicate nodes for running these workloads despite potentially losing some scheduling flexibility? I'd love to hear any advice or real-world experiences from others who have tackled this.

Answers

VelvetCurtainCall
If you want redundancy, I suggest running 3 Kafka pods for that extra reliability. You can also start with internal storage as persistent volumes and then shift to external solutions as your needs grow. Just keep in mind that static storage options, like local disks, wonโ€™t move if the node fails, which is something to think about.
Reply to this answer
pLanB works
I'm using the CNPG operator, and it's been great for integrating backups to my preferred storage solutions. It could be a big help in managing PostgreSQL.
Reply to this answer
6 bricks stacked
If you're just reserving nodes for PostgreSQL or Kafka, it might be simpler to stick with VMs instead of adding Kubernetes complexity. But if you decide to go with Kubernetes, both PostgreSQL and Kafka have operators that can really simplify management. The use of local disks can work as long as your setup is relatively static and you donโ€™t plan to move nodes around too much.
Reply to this answer
orbit.node.A
You should definitely consider starting with Rook. It manages storage well and would allow you to pass disks through to the VMs effectively.
Reply to this answer
VALVE_inspector
We're currently using the vSphere CSI driver, and it has been working well for us. It's worth considering, especially if your environment is stable.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions