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-configure-brokerlistener.md
+54-7Lines changed: 54 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ ms.subservice: azure-mqtt-broker
7
7
ms.topic: how-to
8
8
ms.custom:
9
9
- ignite-2023
10
-
ms.date: 08/29/2024
10
+
ms.date: 10/08/2024
11
11
12
12
#CustomerIntent: As an operator, I want understand options to secure MQTT communications for my IoT Operations solution.
13
13
---
@@ -38,7 +38,24 @@ For a list of the available settings, see the [Broker Listener](/rest/api/iotope
38
38
39
39
When you deploy Azure IoT Operations Preview, the deployment also creates a *BrokerListener* resource named `listener` in the `azure-iot-operations` namespace. This listener is linked to the default Broker resource named `broker` that's also created during deployment. The default listener exposes the broker on port 18883 with TLS and SAT authentication enabled. The TLS certificate is [automatically managed](howto-configure-tls-auto.md) by cert-manager. Authorization is disabled by default.
40
40
41
-
To inspect the listener, run:
41
+
To view or edit the listener:
42
+
43
+
# [Portal](#tab/portal)
44
+
45
+
1. In the Azure portal, navigate to your IoT Operations instance.
46
+
1. Under **Azure IoT Operations resources**, select **MQTT Broker**.
47
+
48
+
:::image type="content" source="media/howto-configure-brokerlistener/configure-broker-listener.png" alt-text="Screenshot using Azure portal to view Azure IoT Operations MQTT configuration.":::
49
+
50
+
1. From the broker listener list, select the **default** listener.
51
+
52
+
:::image type="content" source="media/howto-configure-brokerlistener/default-broker-listener.png" alt-text="Screenshot using Azure portal to view or edit the default broker listener.":::
53
+
54
+
1. Review the listener settings and make any changes as needed.
55
+
56
+
# [Kubernetes](#tab/kubernetes)
57
+
58
+
To view the default *BrokerListener* resource, use the following command:
42
59
43
60
```bash
44
61
kubectl get brokerlistener listener -n azure-iot-operations -o yaml
@@ -71,33 +88,59 @@ spec:
71
88
72
89
To learn more about the default BrokerAuthentication resource linked to this listener, see [Default BrokerAuthentication resource](howto-configure-authentication.md#default-brokerauthentication-resource).
73
90
74
-
### Update the default BrokerListener
91
+
### Update the default broker listener
75
92
76
93
The default *BrokerListener* uses the service type *ClusterIp*. You can have only one listener per service type. If you want to add more ports to service type *ClusterIp*, you can update the default listener to add more ports. For example, you could add a new port 1883 with no TLS and authentication off with the following kubectl patch command:
This example shows how to create a new *BrokerListener* resource for a *Broker* resource named *my-broker*. The *BrokerListener* resource defines a two ports that accept MQTT connections from clients.
103
+
This example shows how to create a new *BrokerListener* resource named *loadbalancer-listener* for a *Broker* resource. The *BrokerListener* resource defines a two ports that accept MQTT connections from clients.
85
104
86
105
- The first port listens on port 1883 with no TLS and authentication off. Clients can connect to the broker without encryption or authentication.
87
106
- The second port listens on port 18883 with TLS and authentication enabled. Only authenticated clients can connect to the broker with TLS encryption. TLS is set to `automatic`, which means that the listener uses cert-manager to get and renew its server certificate.
88
107
108
+
# [Portal](#tab/portal)
109
+
110
+
1. In the Azure portal, navigate to your IoT Operations instance.
111
+
1. Under **Azure IoT Operations resources**, select **MQTT Broker**.
112
+
1. Select **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.
113
+
114
+
:::image type="content" source="media/howto-configure-brokerlistener/create-loadbalancer.png" alt-text="Screenshot using Azure portal to create MQTT broker for load balancer listener.":::
| Service name | Name of the Kubernetes service associated with the BrokerListener. |
122
+
| Service type | Type of broker service, such as *LoadBalancer*, *NodePort*, or *ClusterIP*. |
123
+
| Port | Port number on which the BrokerListener listens for MQTT connections. |
124
+
| Authentication | The [authentication resource reference](howto-configure-authentication.md). |
125
+
| Authorization | The [authorization resource reference](howto-configure-authorization.md). |
126
+
| TLS | Indicates whether TLS is enabled for secure communication. Can be set to [automatic](howto-configure-tls-auto.md) or [manual](howto-configure-tls-manual.md). |
127
+
128
+
1. Select **Create listener**.
129
+
130
+
# [Kubernetes](#tab/kubernetes)
131
+
89
132
To create these *BrokerListener* resources, apply this YAML manifest to your Kubernetes cluster:
For more information about authentication, see [Configure MQTT broker authentication](howto-configure-authentication.md). For more information about authorization, see [Configure MQTT broker authorization](howto-configure-authorization.md). For more information about TLS, see [Configure TLS with automatic certificate management to secure MQTT communication in MQTT broker](howto-configure-tls-auto.md) or [Configure TLS with manual certificate management to secure MQTT communication in MQTT broker](howto-configure-tls-manual.md).
0 commit comments