Kubernetes
Minimal STAN Setup
kubectl apply -f https://raw.githubusercontent.com/nats-io/k8s/master/nats-streaming-server/single-server-stan.ymlkubectl run -i --rm --tty nats-box --image=synadia/nats-box --restart=Never
# Send/Receive message to STAN
nats-box:~# stan-pub -s nats -c stan hello world
Published [hello] : 'world'
nats-box:~# stan-sub -s nats -c stan hello
Connected to nats clusterID: [stan] clientID: [stan-sub]
Listening on [hello], clientID=[stan-sub], qgroup=[] durable=[]
[#1] Received: sequence:1 subject:"hello" data:"world" timestamp:1579544643374163630HA Setup Using StatefulSets
# Create STAN cluster
kubectl apply -f https://raw.githubusercontent.com/nats-io/k8s/master/nats-streaming-server/simple-stan.ymlUsing Helm Charts
最后更新于