File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
articles/iot-operations/manage-mqtt-broker Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ The first option is to connect from within the cluster. This option uses the def
87
87
1. Inside the pod's shell, run the following command to publish a message to the broker :
88
88
89
89
` ` ` console
90
- mosquitto_pub --host aio-mq-dmqtt-frontend --port 8883 --message "hello" --topic "world" --username '$sat' --pw $(cat /var/run/secrets/tokens/mq-sat) --debug --cafile /var/run/certs/ca.crt
90
+ mosquitto_pub --host aio-mq-dmqtt-frontend --port 8883 --message "hello" --topic "world" --debug --cafile /var/run/certs/ca.crt -D CONNECT authentication-method 'K8S-SAT' -D CONNECT authentication-data $(cat /var/run/secrets/tokens/mq-sat)
91
91
` ` `
92
92
93
93
The output should look similar to the following :
@@ -104,7 +104,7 @@ The first option is to connect from within the cluster. This option uses the def
104
104
1. To subscribe to the topic, run the following command :
105
105
106
106
` ` ` console
107
- mosquitto_sub --host aio-mq-dmqtt-frontend --port 8883 --topic "world" --username '$sat' --pw $(cat /var/run/secrets/tokens/mq-sat) --debug --cafile /var/run/certs/ca.crt
107
+ mosquitto_sub --host aio-mq-dmqtt-frontend --port 8883 --topic "world" --debug --cafile /var/run/certs/ca.crt -D CONNECT authentication-method 'K8S-SAT' -D CONNECT authentication-data $(cat /var/run/secrets/tokens/mq-sat)
108
108
` ` `
109
109
110
110
The output should look similar to the following :
@@ -125,7 +125,7 @@ The first option is to connect from within the cluster. This option uses the def
125
125
> Using `--insecure` is not recommended for production scenarios. Only use it for testing or development purposes.
126
126
127
127
` ` ` console
128
- mqttui --broker mqtts://aio-mq-dmqtt-frontend:8883 --username '$sat ' --password $(cat /var/run/secrets/tokens/mq-sat) --insecure
128
+ mqttui --broker mqtts://aio-mq-dmqtt-frontend:8883 --insecure -D CONNECT authentication-method 'K8S-SAT ' -D CONNECT authentication-data $(cat /var/run/secrets/tokens/mq-sat)
129
129
` ` `
130
130
131
131
1. To remove the pod, run `kubectl delete pod mqtt-client -n azure-iot-operations`.
You can’t perform that action at this time.
0 commit comments