Skip to content

Latest commit

 

History

History

minikube

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Local cluster example using Minikube

This example installs the stack on a local cluster. This is especially useful for testing, developing, and for educational purposes. This example has only tested with a Kubernetes single node cluster on minikube using the Docker deployment method.

👁️‍🗨️ Requirements

  • minikube local k8s cluster
  • kubectl installed and configured for you local cluster
  • helm installed

🚀 Usage

  1. Enable minikube nginx ingress addon, see docs for more.

    minikube addons enable ingress
  2. Get the helm repos of all dependencies

    helm repo add iot-stack https://tum-gis.github.io/tum-gis-iot-stack-k8s
    
    # Optional: Uncomment, if you want to test cert-manager as certificate issuer
    # helm repo add jetstack https://charts.jetstack.io
    
    # Update all repos
    helm repo update
  3. Install the chart with the default configuration specified in values-local.yml:

    helm install iot-stack iot-stack/tum-gis-iot-stack-k8s \
      -n iot-stack --create-namespace \
      --atomic --wait \
      --values "https://raw.githubusercontent.com/tum-gis/tum-gis-iot-stack-k8s/main/examples/minikube/values-minikube.yml"
  4. After the chart has been deployed successfully, we need to configure access to the services. The configuration in this example (see values-minikube.yml) uses myhost.info as fake hostname for the ingress controller. To access the services, we need to find the IP address, that has been assigned to this hostname using kubectl.

    $ kubectl -n iot-stack get ingress
    
    NAME                       CLASS   HOSTS         ADDRESS        PORTS     AGE
    iot-stack-frostweb-ing     nginx   myhost.info   192.168.49.2   80, 443   7s
    iot-stack-grafana-ing      nginx   myhost.info   192.168.49.2   80, 443   7s
    iot-stack-nodered-ing      nginx   myhost.info   192.168.49.2   80, 443   7s
    iot-stack-nodered-ing-ui   nginx   myhost.info   192.168.49.2   80, 443   7s

    Add the IP -> hostname mapping to /etc/hosts file with your favorite text editor or the code below, based on the output of the last step.

     $ sudo bash -c 'echo "192.168.49.2 myhost.info" >> /etc/hosts && cat /etc/hosts'
    127.0.0.1       localhost
    127.0.1.1       foo.bar
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    
    192.168.49.2 myhost.info
  5. After that, the services are available here:

All services can be accessed with the username admin and password changeMe.

🛠️ Customization

If you want to change the default configuration (which is highly recommended to change the default password), download a copy of values-minikube.yml. Edit the file locally and install the chart using your local configuration:

helm install iot-stack iot-stack/tum-gis-iot-stack-k8s \
  -n iot-stack --create-namespace \
  --atomic --wait \
  --values my-local-values.yml