Local k3d Installation
3 minute read
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
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
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
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
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 the6443
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.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
Add the UMH Helm repository.
helm repo add united-manufacturing-hub https://repo.umh.app/
Update the Helm repository.
helm repo update
Create the namespace.
kubectl create namespace united-manufacturing-hub
Install the UMH stack.
helm install united-manufacturing-hub united-manufacturing-hub/united-manufacturing-hub -n united-manufacturing-hub
Open UMHLens / OpenLens on your device.
From the homepage, click on Browse Clusters in Catalog. You should see all your clusters.
Click on a cluster to connect to it.
Navigate to Helm > Releases and change the namespace from default to united-manufacturing-hub in the upper right corner.
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:
Open a terminal and run the following command to get the kubeconfig file:
k3d kubeconfig get united-manufacturing-hub
Copy the output of the command.
Open UMHLens / OpenLens, click on the three horizontal lines in the upper left corner and choose Files > Add Cluster.
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.