In this section, you can find several examples of how to deploy NATS, NATS Streaming and other tools from the NATS ecosystem on Kubernetes.
The fastest and easiest way to get started is with just one shell command:
curl -sSL https://nats-io.github.io/k8s/setup.sh | sh
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.
This will run a
nats-setup container with the required policy and deploy a NATS cluster on Kubernetes with external access, TLS and decentralized authorization.
You can customize the installer to install without TLS or without Auth to have a simpler setup as follows:
# Disable TLScurl -sSL https://nats-io.github.io/k8s/setup.sh | sh -s -- --without-tls# Disable Auth and TLS (also disables NATS surveyor and NATS Streaming)curl -sSL https://nats-io.github.io/k8s/setup.sh | sh -s -- --without-tls --without-auth
Note: Since NATS Streaming will be running as a leafnode to NATS (under the STAN account) and that NATS Surveyor requires the system account to monitor events, disabling auth also means that NATS Streaming and NATS Surveyor based monitoring will be disabled.
The monitoring dashboard setup using NATS Surveyor can be accessed by using port-forward:
kubectl port-forward deployments/nats-surveyor-grafana 3000:3000
Next, open the following URL in your browser: