Getting Started with microk8s – using Activiti Cloud

This blog post builds on:

There’s also more, if slightly outdated, here:

The main focus of this post is more about making it work with work than it is to do with Activiti

This is based on Ubuntu 18.04

Before starting it’s a good idea to configure your firewall – see for more details

sudo ufw allow in on cbr0 && sudo ufw allow out on cbr0
sudo ufw default allow routed

First install microk8s:

sudo snap install microk8s --classic

If you’re using kubectl in other contexts then you may want to configure it – being careful not to overwrite an existing file.
This allows you to use kubectl rather than microk8s.kubectl if you want to

test -f ${HOME}/.kube/config || microk8s.kubectl config view --raw > $HOME/.kube/config

If you want details about your cluster

microk8s.kubectl config get-contexts
microk8s.kubectl config use-context microk8s

There are various plugins that you will want or need so install these:

microk8s.enable dns dashboard storage ingress

Wait for everything to be ready

microk8s.status --wait-ready

You’ll need some storage:
Create a file pvc.yaml which allocates some storage and apply it

kind: PersistentVolume
apiVersion: v1
  name: task-pv-volume
    type: local
  storageClassName: manual
    storage: 10Gi
    - ReadWriteOnce
    path: "/data/microk8s"
microk8s.kubectl apply -f pvc.yaml

Have a look at your storage:

microk8s.kubectl get pv

Set up helm – you might need to install it first which you can do with snap.

helm init

and wait for everything to settle down

watch microk8s.kubectl get all --all-namespaces

Add the activiti charts

helm repo add activiti-cloud-charts
helm repo update

You need an IP address to pass to the helm install so it’s a good idea to create a new, non-routeable, one against your existing interface so that if the IP address changes e.g. different DHCP lease then it will still work.

ip addr show dynamic
sudo ip address add dev enxc8f750d9c720
microk8s.kubectl create namespace activiti7

Now you can just install as per the getting started guide

helm install --name example activiti-cloud-charts/activiti-cloud-full-example --set --namespace=activiti7
Activiti Keycloak :
Activiti Gateway :
Activiti Modeler :
Activiti GraphiQL :

and wait for everything to settle down

watch microk8s.kubectl get all --all-namespaces

Accessing the k8s dashboard

Get the IP via:

kubectl get svc -n kube-system

then get the token using:

kubectl describe secret kubernetes-dashboard --namespace=kube-system