Skip to main content

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 Router, 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.

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, therefore for ioFog releases that have not officially released a stable chart yet, so we need to specify the --version here manually. To install version 3.0.0 for example, use the following:

helm install my-ecn \
--namespace my-ns --create-namespace \
--version 3.0.0 \
--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-3.0.0 3.0.0 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. We recommend not changing the image variables, as these are predefined for each ioFog version, and mixing these across versions is not supported.

PropertyDefault valueDescription
user.firstNameFirstFirst name of initial user in Controller
user.surnameSecondSurname of initial user in Controller
user.emailuser@domain.comEmail (login) of initial user in Controller
user.passwordH23fkidf9hoibf2nlkPassword of initial user in Controller
images.controlleriofog/controllerController Docker image
images.operatoriofog/iofog-operator:Operator Docker image
images.portManageriofog/port-manager:Port Manager Docker image
images.proxyiofog/proxy:Proxy Docker image
replicas.operator1Number of replicas of Operator pods
replicas.controller1Number 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 potctl. Make sure the --namespace here matches the one used during helm install step, so potctl can find the correct ECN using your kubeconfig file.

potctl --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