Closed exu closed 5 years ago
You could start it in embedded mode by using the configuration file and then mounting it as a volume. If only want to have a single instance the NATS Streaming server this would work, but if want to have a cluster of multiple nodes then also need a kubernetes service etc.. that the nats operator helps with.
apiVersion: "streaming.nats.io/v1alpha1"
kind: "NatsStreamingCluster"
metadata:
name: "example-stan"
spec:
size: 3
natsSvc: "example-nats-cluster"
configFile: "/etc/stan/config/streaming.conf"
template:
spec:
containers:
- ports:
- containerPort: 8222
volumes:
- name: streaming-conf
secret:
secretName: streaming-conf
containers:
- name: nats-streaming
volumeMounts:
- mountPath: /etc/stan/config
name: streaming-conf
readOnly: true
Thanks for help, I'll try it.
Unless I'm missing something, this doesn't seem to be possible, the -nats_server
command-line option (which overrides the configuration file option) it's always populated by the operator, and therefore always expect to have an externally running server.
I think you're spot on here @GerardoGR .... thank you for pointing it out. Saved me some time.
Is there possibility to run nats-straeaming-server cluster which works without NATS cluster - NATS is started in embedded mode in nats-streaming-server?