Local k3d installation
3 minute read
This installation method can now be done automatically by 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.
Requirements
- Operating system (64-bit):
- Windows 10 version 2004 and higher or Windows 11
- Hardware:
- CPU: 2 cores or more
- RAM: 8GB or more
- Storage: 10GB free
Dependencies
Verify that you have WSL installed.
- Open Powershell and type
wsl --status
. If you get an error you probably need to install it. Refer to the Microsoft documentation on how to do that.
- Open Powershell and type
Installation
Make sure your Docker Desktop application is running.
Open a PowerShell terminal. Be sure to use the option Run as Administrator.
Install kubectl
choco install kubernetes-cli
Install helm
choco install kubernetes-helm
Install k3d
choco install k3d
Create the cluster
k3d cluster create united-manufacturing-hub
Create a namespace in Kubernetes
kubectl create namespace united-manufacturing-hub
If you get an error like this (the IP doesn’t matter):
Unable to connect to the server: dial tcp 123.456.789.132:63074: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
delete your k3d cluster and re-create it with the api-port flag:
k3d cluster delete united-manufacturing-hub
k3d cluster create united-manufacturing-hub --api-port 127.0.0.1:6443
Add the UMH repo
helm repo add united-manufacturing-hub https://repo.umh.app/
Ensure it is up-to-date with
helm repo update
Install the stack
helm install united-manufacturing-hub united-manufacturing-hub/united-manufacturing-hub -n united-manufacturing-hub
Open UMHLens on your device. You can get UMHLens for free from this GitHub Repository .
Sometimes UMHLens automatically creates a k3d-Cluster. Click on Browse-Clusters to check. If there is no cluster you have to create it manually (follow step 13-18) otherwise continue with step 18.
Get the Helm config to import into UMHLens
kubectl config view --raw
Click the three horizontal lines in the upper left corner and choose files → preferences
Click on Kubernetes and select “Add custom repo”, type in
https://repo.umh.app
as the URL and decide on a name for the repository.Click again file → Add Cluster
Paste the clipboard (which you got from
kubectl config view --raw
) into the kubectl prompt of UMHLens.Click on Add Cluster.
Click on Browse Clusters in Catalog, then connect to the Cluster.
Click on Helm -> Releases and change the namespace from default to united-manufacturing-hub in the upper right corner
Click on the Release
united-manufacturing-hub
to be able to inspect the values.yaml file, which holds the configurations of all microservices used in the cluster.
What’s next
You have successfully deployed the UMH stack using k3d.
Let’s continue with Node-RED! Follow this guide to see how.