title
United Manufacturing Hub k3d

How to Open Ports and Access Services Using k3d in the United Manufacturing Hub

Learn how to avoid errors and access services like Node-RED, Grafana, PostgreSQL, and OPC-UA simulator in the United Manufacturing Hub by opening specific ports and forwarding them to your host machine using k3d. Follow our step-by-step guide to easily access services.

How to Open Ports and Access Services Using k3d in the United Manufacturing Hub

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

  1. Determine the port number for the service you want to access:
    Node-RED: 1880
    Grafana: 8080
    PostgreSQL: 5432
    OPC-UA simulator: 46010
  2. Check if the port is free on your host device.
  3. Execute the following command in your command line, replacing the port number with the correct one for the service you want to access:
    k3d cluster edit united-manufacturing-hub --port-add <PORT_NUMBER>:<PORT_NUMBER>@server:0
    
    For example, to access Node-RED using port 1880, execute the following command:
    k3d cluster edit united-manufacturing-hub --port-add 1880:1880@server:0
    
  4. Wait a few minutes until the changes are applied.
    2023-03-13_19h52_27-1
  5. Access the service by using localhost:<PORT_NUMBER>. For example, to access Node-RED, enter localhost:1880/nodered in your browser.

Stay up-to-date

Subscribe to the UMH Learning Hub Newsletter to receive the latest updates and gain early access to our blog posts.

Subscribe