title
minikube United Manufacturing Hub

Local minikube installation

Deploy the UMH stack with minikube

Local minikube installation

Here is a step-by-step guide on how to deploy the UMH stack using minikube, a tool to quickly spin up a Kubernetes cluster in your local machine. This method is quicker than using a virtual machine with k3os, but less reliable. We suggest using minikube only for small tests.

⚠️
Bear in mind that this way of setting up the UMH stack is not recommended. For testing and development purposes we recommend a k3d installation.

If you are using a different way to install the software, make sure to install the following versions. Specifically installing minikube directly from the website results in a new version, which is not supported yet. Older versions are also not supported anymore.

  • minikube 1.26.1
  • Kubernetes 1.24.3
  • Helm 3.10

Dependencies

  1. 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.
  2. Docker Desktop. You can follow the Docker documentation here.
  3. Chocolatey.Read how to do that here.

Installation

  1. Open a PowerShell terminal. Be sure to use the option Run as Administrator.
  2. Install minikube
    choco install minikube

    when using Ubuntu you can also use the following command

    curl -LO https://storage.googleapis.com/minikube/releases/v1.26.1/minikube-linux-amd64 && sudo install minikube-linux-amd64 /usr/local/bin/minikube
  3. Install helm
    choco install kubernetes-helm
  4. Install kubectl
    choco install kubernetes-cli
  5. Set the default driver for minikube. We recommend Docker, but you can use a variety of drivers. Read the Minikube docs for further information.
    minikube config set driver docker
  6. Start an instance of minikube with 2 CPUs and 4GB of RAM. You may need more if you decide to customize the services with the development.yaml file.
    minikube start --cpus 2 --memory 4096
  7. Create a namespace in Kubernetes
    kubectl create namespace united-manufacturing-hub
  8. Add the UMH repo
    helm repo add united-manufacturing-hub https://repo.umh.app/
  9. Ensure it is up-to-date with helm repo update
  10. Install the stack
    helm install united-manufacturing-hub united-manufacturing-hub/united-manufacturing-hub -n united-manufacturing-hub
  11. Get the Helm config to import into UMHLens
    kubectl config view
  12. Open UMHLens on your device. You can get UMHLens for free from this GitHub Repository.
  13. Sometimes UMHLens automatically creates a minikube-Cluster. Click on Browse-Clusters to check. If there is no cluster you have to create it manually (follow step 14-18) otherwise continue with step 19.
  14. Click the three horizontal lines in the upper left corner and choose files → preferences
  15. 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.
  16. Click again file → Add Cluster
  17. Paste the clipboard (which you got from kubectl config view) into the kubectl prompt of UMHLens.
  18. Click on Add Cluster.
  19. Click on Browse Clusters in Catalog, then connect to the Cluster.
  20. Click on Helm -> Releases and change the namespace from default to united-manufacturing-hub in the upper right corner
⚠️
Accessing the services like Node-RED can only be done using the port-forwarding feature from UMHLens.
⚠️
In minikube by default externally exposed services are deactivated. To access them, you need to use either the port-forwarding feature from UMHLens or using the minikube ingress tutorial from further down.

Enable minikube ingress

  1. minikube addons enable ingress
  2. minikube tunnel

Now it should look like this:

Any you can access Node-RED e.g., via localhost:1880/nodered

This tunnel needs to be always started using minikube tunnel when you want to access these services.

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