Kubernetes - Deploy Control Plane Using Helm

In this tutorial, we will install the ioFog Kubernetes Control Plane using Helm.

The Helm Chart installs a set of Custom Resources and an Operator onto the cluster. It then creates a Custom Resource Definition which describes an ioFog Control Plane to be deployed on the cluster. The Operator consumes this CRD and creates deployments for the Controller, Port Manager, and Kubelet, as well as associated services.

Prerequisites

First, we need a working Kubernetes cluster. We can simply set up a cluster on the Google Kubernetes Engine (GKE) by following the Creating a cluster tutorial. Using any other managed cluster providers works as well, so do custom installations of Kubernetes, e.g. Minikube.

IoFog also provides tools for infrastructure setup to setup a Kubernetes cluster in case we don't have one available. Please see Platform Tools for more details.

The tutorial requires installation of Helm v3+ and kubectl executing the deployment.

From now on, we assume we have a running Kubernetes cluster.

Install Helm Chart

Add the ioFog Helm repository to our local index:

helm repo add iofog https://eclipse-iofog.github.io/helm

To list all available version of ioFog Helm chart, including development versions, run:

helm search repo -l --devel iofog/iofog

Install the Chart while specifying user credentials and a target namespace. If we are not using the default namespace, we can use --create-namespace from Helm v3.2 onwards. Otherwise the namespace must already exist on the cluster. Note that not specifying the version default to latest stable version of ioFog chart, but ioFog 2.0 has not officially released a stable chart yet, so we need to specify the --version here.

helm install my-ecn \
 --namespace my-ns --create-namespace \
 --version 2.0.0-rc1 \
 --set user.email=user@domain.com \
 --set user.password=any123password345 \
 iofog/iofog

The my-ecn refers to the Helm release name as shown below.

To list all Helm releases, we can simply run helm list. The result should look like this:

NAME     REVISION  UPDATED                   STATUS    CHART             APP VERSION  NAMESPACE
my-ecn   1         Tue Oct  1 21:34:42 2019  DEPLOYED  iofog-2.0.0-rc1   2.0.0-rc1    my-ns

The following is a complete list of all user configurable properties for the ioFog Helm chart. All of the properties are optional and have defaults. Use --set property.name=value in helm install to parametrize Helm release.

Property Default value Description
user.firstName First First name of initial user in Controller
user.surname Second Surname of initial user in Controller
user.email user@domain.com Email (login) of initial user in Controller
user.password H23fkidf9hoibf2nlk Password of initial user in Controller
images.controller iofog/controller:2.0.0-rc1 Controller Docker image
images.kubelet iofog/iofog-kubelet:2.0.0-rc1 Kubelet Docker image
images.operator iofog/iofog-operator:2.0.0-rc1 Operator Docker image
images.portManager iofog/port-manager:2.0.0-rc1 Port Manager Docker image
images.proxy iofog/proxy:2.0.0-rc1 Proxy Docker image
replicas.operator 1 Number of replicas of Operator pods
replicas.controller 1 Number of replicas of Controller pods

Connection to Installed ioFog

Once the installation is complete, you will be able to connect to the ioFog Controller on K8s using iofogctl. Make sure the --namespace here matches the one used during helm install step, so iofogctl can find the correct ECN using your kubeconfig file.

iofogctl --namespace my-ns connect --kube ~/.kube/config --email user@domain.com --pass H23fkidf9hoibf2nlk

Uninstall ioFog Stack

To uninstall ioFog stack, simply delete the Helm release.

helm --namespace my-ns delete my-ecn