I wrote a custom Azure IoT Edge
module (Node.js) that needs to talk to a WebSocket server running on the host (not in a container).
How can I open the IoT Edge module container on port 9090
to allow for this communication?
I wrote a custom Azure IoT Edge
module (Node.js) that needs to talk to a WebSocket server running on the host (not in a container).
How can I open the IoT Edge module container on port 9090
to allow for this communication?
I got this to work by adding this to my create options for my module in the deployment json file:
"createOptions": {
"ExposedPorts": {
"9090/tcp": {}
}
}
The createOptions enables ingress where a process/container running on the host can talk to the module against the exposed port.
For egress to an endpoint on the host, there should be nothing needed. One can just use the hostIP:someport.
For outbound connectivity (from your module to some other endpoint), you do not need to configure anything on the module. That should work out of the box. There might, of course, be firewalls etc. running on your host.