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
+22-13Lines changed: 22 additions & 13 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: 07/27/2024
10
+
ms.date: 08/03/2024
11
11
12
12
#CustomerIntent: As an operator, I want understand options to secure MQTT communications for my IoT Operations solution.
13
13
---
@@ -72,7 +72,7 @@ To inspect the listener, run:
72
72
kubectl get brokerlistener listener -n azure-iot-operations -o yaml
73
73
```
74
74
75
-
The output should look like this, with most metadata removed for brevity:
75
+
The output should look similar to this, with most metadata removed for brevity:
76
76
77
77
```yaml
78
78
apiVersion: mq.iotoperations.azure.com/v1beta1
@@ -82,6 +82,8 @@ metadata:
82
82
namespace: azure-iot-operations
83
83
spec:
84
84
brokerRef: broker
85
+
serviceName: aio-mq-dmqtt-frontend
86
+
serviceType: ClusterIp
85
87
ports:
86
88
- authenticationRef: authn
87
89
port: 8883
@@ -93,18 +95,24 @@ spec:
93
95
kind: Issuer
94
96
name: mq-dmqtt-frontend
95
97
mode: Automatic
96
-
serviceName: aio-mq-dmqtt-frontend
97
-
serviceType: ClusterIp
98
98
```
99
99
100
100
To learn more about the default BrokerAuthentication resource linked to this listener, see [Default BrokerAuthentication resource](howto-configure-authentication.md#default-brokerauthentication-resource).
101
101
102
+
### Update the default BrokerListener
103
+
104
+
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.
105
113
106
114
- The first port listens on port 1883 with no TLS and authentication off. Clients can connect to the broker without encryption or authentication.
107
-
- The second port listens on port 8883 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.
115
+
- 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.
108
116
109
117
To create these *BrokerListener* resources, apply this YAML manifest to your Kubernetes cluster:
0 commit comments