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.
- Determine the port number for the service you want to access:
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, enter
localhost:1880/noderedin your browser.