NATS和Kubernetes
In this section, you can find several examples of how to deploy NATS and other tools from the NATS ecosystem on Kubernetes.
Running NATS on K8S
Getting started
The fastest and easiest way to get started is to use NATS Helm Charts.
This will install NATS Server in basic setup with NATS box utility container that can be used as a simple way to interact with the server using nats
and nsc
CLI tools preinstalled.
In case you don't have a cluster already, you can find some notes on how to create a small cluster using one of the hosted Kubernetes providers here.
To check if NATS is reacheable from within the cluster connect to NATS box
and try subscribing and publishing
If you're seeing the messages, all went well and you have successfully installed NATS.
Now, let's discover some more advanced options.
NATS HA setup
To setup your cluster in HA manner, you need to customize NATS Helm charts. Fortunately, values.yaml
have most of the features available as easy values customization and there should be no need to manually tweak the templates.
One way to do it is to create your own .yaml
file with changed only values:
and run
JetStream
Similarly to HA, enabling JetStream requires changing few values:
For more examples, including TLS, Auth, external access, leaf nodes and gateways please check Advanced Helm chart examples
最后更新于