In versions v0.9.11 and before, accessing services in the k3d cluster in the United Manufacturing Hub required using the port-forwarding feature of UMHLens, which can be prone to errors and may require frequent restarting. To avoid these issues, follow these steps to open specific ports and forward them to your host machine using k3d. By doing so, you can easily access services such as Node-RED, Grafana, PostgreSQL, and OPC-UA simulator.
Instructions
- Determine the port number for the service you want to access:
Node-RED: 1880
Grafana: 8080
PostgreSQL: 5432
OPC-UA simulator: 46010 - Check if the port is free on your host device.
- Execute the following command in your command line, replacing the port number with the correct one for the service you want to access:
For example, to access Node-RED using port 1880, execute the following command:k3d cluster edit united-manufacturing-hub --port-add <PORT_NUMBER>:<PORT_NUMBER>@server:0
k3d cluster edit united-manufacturing-hub --port-add 1880:1880@server:0
- Wait a few minutes until the changes are applied.
- Access the service by using
localhost:<PORT_NUMBER>
. For example, to access Node-RED, enterlocalhost:1880/nodered
in your browser.