Skip to content

Commit 48583eb

Browse files
Merge pull request #280263 from PatAltimore/patricka-port-forward-aksee
Add AKSEE port forwarding
2 parents 0bc3677 + 87daf78 commit 48583eb

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

articles/iot-operations/manage-mqtt-connectivity/howto-test-connection.md

Lines changed: 26 additions & 2 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: 03/18/2024
10+
ms.date: 07/08/2024
1111

1212
#CustomerIntent: As an operator or developer, I want to test MQTT connectivity with tools that I'm already familiar with to know that I set up my Azure IoT MQ broker correctly.
1313
---
@@ -253,8 +253,32 @@ With [minikube](https://minikube.sigs.k8s.io/docs/), [kind](https://kind.sigs.k8
253253
1. Use 127.0.0.1 to connect to the broker at port 8883 with the same authentication and TLS configuration as the example without port forwarding.
254254

255255
Port forwarding is also useful for testing IoT MQ locally on your development machine without having to modify the broker's configuration.
256+
For more information about minikube, see [Use Port Forwarding to Access Applications in a Cluster](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/)
256257

257-
To learn more, see [Use Port Forwarding to Access Applications in a Cluster](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/) for minikube and [Expose Kubernetes services to external devices](/azure/aks/hybrid/aks-edge-howto-expose-service) for Azure Kubernetes Services Edge Essentials.
258+
#### Port forwarding on AKS Edge Essentials
259+
For Azure Kubernetes Services Edge Essentials, you need to perform a few additional steps. For more information about port forwarding, see [Expose Kubernetes services to external devices](/azure/aks/hybrid/aks-edge-howto-expose-service).
260+
1. Assume that the broker's service is exposed to an external IP using a load balancer. For example if you patched the default load balancer `aio-mq-dmqtt-frontend`, get the external IP address for the service.
261+
```bash
262+
kubectl get service aio-mq-dmqtt-frontend --namespace azure-iot-operations
263+
```
264+
265+
Output should look similar to the following:
266+
267+
```Output
268+
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
269+
aio-mq-dmqtt-frontend LoadBalancer 10.43.107.11 192.168.0.4 8883:30366/TCP 14h
270+
```
271+
272+
1. Set up port forwarding to the `aio-mq-dmqtt-frontend` service on the external IP address `192.168.0.4` and port `8883`:
273+
```bash
274+
netsh interface portproxy add v4tov4 listenport=8883 connectport=8883 connectaddress=192.168.0.4
275+
```
276+
277+
1. Open the port on the firewall to allow traffic to the broker's service:
278+
```bash
279+
New-NetFirewallRule -DisplayName "AIO MQTT Broker" -Direction Inbound -Protocol TCP -LocalPort 8883 -Action Allow
280+
```
281+
1. Use the host's public IP address to connect to the MQTT broker.
258282

259283
## No TLS and no authentication
260284

0 commit comments

Comments
 (0)