You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-operations/manage-mqtt-broker/howto-test-connection.md
+56-96Lines changed: 56 additions & 96 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,7 +147,7 @@ Since the [default broker listener](howto-configure-brokerlistener.md#default-br
147
147
148
148
The easiest way to test connectivity is to use the *NodePort* service type in the listener. With that, you can use `<nodeExternalIP>:<NodePort>` to connect like in [Kubernetes documentation](https://kubernetes.io/docs/tutorials/services/connect-applications-service/#exposing-the-service).
149
149
150
-
For example, create a new broker listener with node port service typelistening on port 1883:
150
+
For example, to create a new broker listener with node port service type, service name `aio-broker-nodeport`, and listening on port 1884 (node port 31884):
151
151
152
152
# [Portal](#tab/portal)
153
153
@@ -156,38 +156,21 @@ For example, create a new broker listener with node port service type listening
156
156
1. Select **MQTT broker listener for NodePort** > **Create**. You can only create one listener per service type. If you already have a listener of the same service type, you can add more ports to the existing listener.
157
157
158
158
> [!CAUTION]
159
-
> Setting authentication to **None** and not configuring TLS [turns off authentication and TLS for testing purposes only.](#only-turn-off-tls-and-authentication-for-testing)
159
+
> Setting authentication to **None** and not configuring TLS [turns off authentication and TLS for testing purposes only.](#only-turn-off-tls-and-authentication-for-testing).
| TLS mode | Choose **Manual** or **Automatic**. |
179
-
| Issuer name | Name of the cert-manager issuer. Required. |
180
-
| Issuer kind | Kind of the cert-manager issuer. Required. |
181
-
| Issuer group | Group of the cert-manager issuer. Required. |
182
-
| Private key algorithm | Algorithm for the private key. |
183
-
| Private key rotation policy | Policy for rotating the private key. |
184
-
| DNS names | DNS subject alternate names for the certificate. |
185
-
| IP addresses | IP addresses of the subject alternate names for the certificate. |
186
-
| Secret name | Kubernetes secret containing an X.509 client certificate. |
187
-
| Duration | Total lifetime of the TLS server certificate Defaults to 90 days. |
188
-
| Renew before | When to begin renewing the certificate. |
189
-
190
-
1. Select **Apply** to save the TLS settings.
171
+
| Node port | 31884 |
172
+
173
+
1. Add TLS settings to the listener by selecting **TLS** > **Add** on the port. This step isn't required if you don't need TLS for testing. For more information, see [BrokerListener](howto-configure-brokerlistener.md).
191
174
1. Select **Create** to create the listener.
192
175
193
176
# [Bicep](#tab/bicep)
@@ -198,8 +181,7 @@ For example, create a new broker listener with node port service type listening
> By Kubernetes default, the node port number [must be in the range 30000-32767](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport).
265
+
284
266
Get the node's external IP address:
285
267
286
268
```bash
@@ -303,7 +285,7 @@ The output should look similar to the following:
303
285
Use the external IP address and the node port to connect to the broker. For example, to publish a message to the broker:
If there's no external IP in the output, you might be using a Kubernetes setup that doesn't expose the node's external IP address by default, like many setups of k3s, k3d, or minikube. In that case, you can access the broker with the internal IP along with the node port from machines on the same network. For example, to get the internal IP address of the node:
@@ -326,7 +308,7 @@ Then, use the internal IP address and the node port to connect to the broker fro
326
308
327
309
Another way to expose the broker to the internet is to use the *LoadBalancer* service type. This method is more complex and might require additional configuration, like setting up port forwarding.
328
310
329
-
For example, to create a new broker listener with load balancer service type listening on port 1883:
311
+
For example, to create a new broker listener with load balancer service type, service name `aio-broker-loadbalancer`, and listening on port 1883:
330
312
331
313
# [Portal](#tab/portal)
332
314
@@ -341,31 +323,15 @@ For example, to create a new broker listener with load balancer service type lis
| TLS mode | Choose **Manual** or **Automatic**. |
357
-
| Issuer name | Name of the cert-manager issuer. Required. |
358
-
| Issuer kind | Kind of the cert-manager issuer. Required. |
359
-
| Issuer group | Group of the cert-manager issuer. Required. |
360
-
| Private key algorithm | Algorithm for the private key. |
361
-
| Private key rotation policy | Policy for rotating the private key. |
362
-
| DNS names | DNS subject alternate names for the certificate. |
363
-
| IP addresses | IP addresses of the subject alternate names for the certificate. |
364
-
| Secret name | Kubernetes secret containing an X.509 client certificate. |
365
-
| Duration | Total lifetime of the TLS server certificate Defaults to 90 days. |
366
-
| Renew before | When to begin renewing the certificate. |
367
-
368
-
1. Select **Apply** to save the TLS settings.
333
+
1. Add TLS settings to the listener by selecting **TLS** > **Add** on the port. This step isn't required if you don't need TLS for testing. For more information, see [BrokerListener](howto-configure-brokerlistener.md).
334
+
1. Select **Create** to create the listener.
369
335
1. Select **Create** to create the listener.
370
336
371
337
# [Bicep](#tab/bicep)
@@ -376,8 +342,7 @@ For example, to create a new broker listener with load balancer service type lis
authenticationRef: default # Add BrokerAuthentication reference, omit setting turns off authentication for testing only
410
+
tls:
411
+
# Add TLS settings
412
+
# Omitting section turns off TLS for testing only
450
413
```
451
414
452
415
Use `kubectl` to deploy the configuration:
@@ -558,22 +521,22 @@ The reason that MQTT broker uses TLS and service accounts authentication by defa
558
521
559
522
1. In the Azure portal, go to your IoT Operations instance.
560
523
1. Under **Azure IoT Operations resources**, select **MQTT Broker**.
561
-
1. Select **MQTT broker listener for NodePort** > **Create**. You can only create one listener per service type. If you already have a listener of the same service type, you can add more ports to the existing listener.
524
+
1. Select **MQTT broker listener for NodePort** or **MQTT broker listener for LoadBalancer** > **Create**. You can only create one listener per service type. If you already have a listener of the same service type, you can add more ports to the existing listener.
562
525
563
526
> [!CAUTION]
564
527
> Setting authentication to **None** and not configuring TLS [turns off authentication and TLS for testing purposes only.](#only-turn-off-tls-and-authentication-for-testing)
0 commit comments