nats-io / nats-streaming-operator

NATS Streaming Operator
Apache License 2.0
174 stars 44 forks source link

What's the current state of STAN clustered on GCP? #62

Open jdoig opened 4 years ago

jdoig commented 4 years ago

I'm currently trying to get NATS streaming (file based persistence) working clustered on K8s on GCP and was wondering what state this project is in for that particular use case.

Currently basic set up seems broken: https://github.com/nats-io/nats-streaming-operator/issues/61

And replies to this issue seem to suggest using auto node updates isn't possible: https://github.com/nats-io/nats-streaming-operator/issues/40

And this issue seems to suggest clustered, file based persistence isn't working: https://github.com/nats-io/nats-streaming-operator/issues/23

Have I misunderstood any of these issues? And if not is there a project that meets these needs?

wallyqs commented 4 years ago

This operator has to be updated to use statefulsets which should have been the way to go. So for GCP, I'd suggest starting with statefulsets and volume claims for now, that would be a simple way to start. Sharing some examples here:

# Create NATS cluster
kubectl apply -f https://raw.githubusercontent.com/nats-io/k8s/master/nats-server/simple-nats.yml

# Create STAN cluster
kubectl apply -f https://raw.githubusercontent.com/nats-io/k8s/master/nats-streaming-server/simple-stan.yml

# Create nats-box with tools
kubectl run -i --rm --tty nats-box --image=synadia/nats-box --restart=Never

# Send message to NATS
# nats-sub -s nats hello &
# nats-pub -s nats hello world

# Send/Receive message to STAN
# stan-pub -s nats -c stan hello world
# stan-sub -s nats -c stan hello