@@ -182,34 +182,34 @@ pod/nats-box condition met
182
182
You can now start receiving and sending messages using
183
183
the nats-box instance deployed into your namespace:
184
184
185
- kubectl exec -it pod/nats-box /bin/sh
186
-
187
- Using the test user account:
188
-
189
- nats-sub -creds /var/run/nats/creds/ test/test.creds -s nats 'test.>' &
190
- nats-pub -creds /var/run/nats/creds/ test/test.creds -s nats test.hi 'Hello World'
191
-
192
- Using the system account:
193
-
194
- nats-sub -creds /var/run/nats/creds/sys/sys.creds -s nats://nats:4222 '>'
195
-
185
+ kubectl exec -it pod/nats-box -- /bin/sh -l
186
+
187
+ Using the test account user :
188
+
189
+ nats-sub test &
190
+ nats-pub test 'Hello World'
191
+
192
+ Or try using the system account user to inspect all events in the cluster :
193
+
194
+ nats-sub -creds /var/run/nats/creds/sys/sys.creds '>'
195
+
196
196
The nats-box also includes nats-top which you can use to
197
197
inspect the flow of messages from one of the members
198
- of the cluster.
198
+ of the cluster (press 'q' to exit) .
199
199
200
- nats-top -s nats
200
+ nats-top
201
201
202
202
NATS Streaming with persistence is also available as part of your cluster.
203
203
It is installed under the STAN account so you can use the following credentials:
204
-
205
- stan-pub -creds /var/run/nats/creds/stan/stan.creds -s nats -c stan test.hi 'Hello World'
206
- stan-sub -creds /var/run/nats/creds/stan/stan.creds -s nats -c stan 'test.>'
207
-
204
+
205
+ stan-pub test 'Hello World'
206
+ stan-sub test -all
207
+
208
208
You can also connect to your monitoring dashboard:
209
-
209
+
210
210
kubectl port-forward deployments/nats-surveyor-grafana 3000:3000
211
-
211
+
212
212
Then open the following in your browser:
213
-
213
+
214
214
http://127.0.0.1:3000/d/nats/nats-surveyor?refresh=5s&orgId=1
215
215
```
0 commit comments