Local k3d Installation

This page describes how to deploy the United Manufacturing Hub locally using k3d.

This can now be done using the Community Edition of the Management Console. Go check it out!

Here is a step-by-step guide on how to deploy the UMH stack using k3d, a lightweight wrapper to run k3s in Docker. k3d makes it very easy to create single- and multi-node k3s clusters in Docker, e.g. for local development on Kubernetes.

Before you begin

Your system must meet the following requirements before you can install the United Manufacturing Hub:

  • CPU: 2 cores
  • RAM: 4 GB
  • Storage: 10 GB

You also need to have Docker up and running and either UMHLens or OpenLens installed.

Install dependencies

  1. Install kubectl. Refer to the kubectl installation if you need help.

    choco install kubernetes-cli
    

    brew install kubectl
    

    curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
    sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
    
  2. Install Helm. Refer to the Helm installation if you need help.

    choco install kubernetes-helm
    

    brew install helm
    

    curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
    chmod 700 get_helm.sh
    ./get_helm.sh
    
  3. Install k3d. Refer to the k3d installation if you need help.

    choco install k3d
    

    brew install k3d
    

    curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
    

Create a cluster

  1. Create a cluster.

    k3d cluster create united-manufacturing-hub --api-port 127.0.0.1:6443 --port 8080:8080@server:0 --port 8090:8090@server:0 --port 1880:1880@server:0 --port 5432:5432@server:0 --port 1883:1883@server:0 --port 8883:8883@server:0 --port 9092:9092@server:0 --port 46010:46010@server:0
    

    The --api-port flag is used to expose the Kubernetes API server on the host machine. If the 6443 port is already in use, you can use any other port. The --port flag is used to expose the ports of the services running in the cluster on the host machine. If any of the ports on the left side of the : is already in use, you can use any other port.

  2. Verify that the cluster is up and running.

    kubectl get nodes
    

    The output should look like this:

    NAME                                            STATUS   ROLES                  AGE   VERSION
    k3d-united-manufacturing-hub-server-0           Ready    control-plane,master   10s   v1.24.4+k3s1
    

Install the UMH stack

  1. Add the UMH Helm repository.

    helm repo add united-manufacturing-hub https://repo.umh.app/
    
  2. Update the Helm repository.

    helm repo update
    
  3. Create the namespace.

    kubectl create namespace united-manufacturing-hub
    
  4. Install the UMH stack.

    helm install united-manufacturing-hub united-manufacturing-hub/united-manufacturing-hub -n united-manufacturing-hub
    
  1. Open UMHLens / OpenLens on your device.

  2. From the homepage, click on Browse Clusters in Catalog. You should see all your clusters.

  3. Click on a cluster to connect to it.

  4. Navigate to Helm > Releases and change the namespace from default to united-manufacturing-hub in the upper right corner.

    lens-namespaces
    lens-namespaces

  5. Select the united-manufacturing-hub Release to inspect the release details, the installed resources, and the Helm values.

Troubleshooting

I don’t see the cluster in UMHLens / OpenLens

If you don’t see the cluster in UMHLens / OpenLens, you might have to add the cluster manually. To do so, follow these steps:

  1. Open a terminal and run the following command to get the kubeconfig file:

    k3d kubeconfig get united-manufacturing-hub
    
  2. Copy the output of the command.

  3. Open UMHLens / OpenLens, click on the three horizontal lines in the upper left corner and choose Files > Add Cluster.

  4. Paste the kubeconfig and click Add clusters.

What’s next

  • You can follow the Getting Started guide to get familiar with the UMH stack.
  • If you already know your way around the United Manufacturing Hub, you can follow the Administration guides to configure the stack for production.
Last modified April 17, 2023: build: version 0.9.13 (6cb0a01)