3 minute read
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.
Verify that you have WSL installed.
wsl --status
. If you get an error you probably need to install it. Refer to the Microsoft documentation on how to do that.Docker Desktop
Chocolatey
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.
You have successfully deployed the UMH stack using k3d.
The next step will be to gather some kind of data, and since you did a local installation you probably want to simulate it. We have a guide to generate data with an MQTT Simulator.
You could also directly connect NodeRED without having data. Follow this guide to see how.
If you are not sure on what to do you can get back to the Getting Started page.