Skip to content

Commit 88c93f0

Browse files
authored
Merge pull request #288032 from PatAltimore/patricka-mqtt-portal
Add portal MQTT configuration
2 parents 9d70744 + 5146e8d commit 88c93f0

File tree

4 files changed

+54
-7
lines changed

4 files changed

+54
-7
lines changed

articles/iot-operations/manage-mqtt-broker/howto-configure-brokerlistener.md

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.subservice: azure-mqtt-broker
77
ms.topic: how-to
88
ms.custom:
99
- ignite-2023
10-
ms.date: 08/29/2024
10+
ms.date: 10/08/2024
1111

1212
#CustomerIntent: As an operator, I want understand options to secure MQTT communications for my IoT Operations solution.
1313
---
@@ -38,7 +38,24 @@ For a list of the available settings, see the [Broker Listener](/rest/api/iotope
3838

3939
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.
4040

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:
4259

4360
```bash
4461
kubectl get brokerlistener listener -n azure-iot-operations -o yaml
@@ -71,33 +88,59 @@ spec:
7188
7289
To learn more about the default BrokerAuthentication resource linked to this listener, see [Default BrokerAuthentication resource](howto-configure-authentication.md#default-brokerauthentication-resource).
7390
74-
### Update the default BrokerListener
91+
### Update the default broker listener
7592
7693
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:
7794
7895
```bash
7996
kubectl patch brokerlistener listener -n azure-iot-operations --type='json' -p='[{"op": "add", "path": "/spec/ports/", "value": {"port": 1883, "protocol": "Mqtt"}}]'
8097
```
8198
82-
## Create new BrokerListeners
99+
---
100+
101+
## Create new broker listeners
83102
84-
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.
85104
86105
- The first port listens on port 1883 with no TLS and authentication off. Clients can connect to the broker without encryption or authentication.
87106
- 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.
88107

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.":::
115+
116+
Enter the following settings:
117+
118+
| Setting | Description |
119+
| -------------- | --------------------------------------------------------------------------------------------- |
120+
| Name | Name of the BrokerListener resource. |
121+
| 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+
89132
To create these *BrokerListener* resources, apply this YAML manifest to your Kubernetes cluster:
90133

91134
```yaml
92135
apiVersion: mqttbroker.iotoperations.azure.com/v1beta1
93136
kind: BrokerListener
94137
metadata:
95-
name: my-test-listener
138+
name: loadbalancer-listener
96139
namespace: azure-iot-operations
97140
spec:
98141
brokerRef: broker
99142
serviceType: LoadBalancer
100-
serviceName: my-new-listener
143+
serviceName: aio-broker-loadbalancer
101144
ports:
102145
- port: 1883
103146
protocol: Mqtt
@@ -113,6 +156,10 @@ spec:
113156
group: cert-manager.io
114157
```
115158

159+
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).
160+
161+
---
162+
116163
## Related content
117164

118165
- [Configure MQTT broker authorization](howto-configure-authorization.md)
108 KB
Loading
44.2 KB
Loading
41.8 KB
Loading

0 commit comments

Comments
 (0)