Should we use hostPath for jetstream cluster running in K8S #7749
Replies: 1 comment
|
Do not use
What to use instead: PersistentVolumeClaim (PVC) via StatefulSet — this is the correct pattern and what the NATS Helm chart uses by default: # In the NATS Helm chart values.yaml
nats:
jetstream:
enabled: true
fileStorage:
enabled: true
storageClassName: "gp3" # or your cloud provider's SSD class
size: "20Gi"Each StatefulSet pod gets its own PVC via the For the best throughput, use SSD-backed storage classes ( HA behavior: Each of your 3 NATS nodes maintains its own copy of the stream state (RAFT replication). With PVCs, a node failure means another node takes leadership and the recovered pod rejoins with its PVC intact — no data loss and no full resync needed. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi all,
We are planning to run NATS JetStream cluster on Kubernetes with multiple worker nodes, where each node may run one or more JetStream pods.
Should we use hostPath on the worker nodes when creating PVCs for JetStream containers? If we do, will this impact HA or other JetStream behaviors?
Thanks in advance.
All reactions