Skip to main content
Skip table of contents

MicroK8s Single-Node Deployment


This guide illustrates the steps involved in deploying the CIM Solution on microk8s distribution of  Kubernetes. 


Hardware Requirement



Node Role

vCPU

RAM

Storage

Minimum OS revsion
1Master+ Worker816 GiB150 GiB mounted at / or /varUbuntu-20.04 LTS +

Deployment 

microk8s is currently supported for Single-Node Deployment only. 

update the system to latest updates

CODE
sudo apt-get -y update

Install core and  microk8s 

CODE
sudo snap install core
snap install microk8s --classic --channel=1.24


if you get error like below 

CODE
error: cannot install "microk8s": persistent network error: Post
       https://api.snapcraft.io/v2/snaps/refresh: dial tcp: lookup api.snapcraft.io: Temporary
       failure in name resolution

then try restarting the systemd-resolver by executing


CODE
systemctl restart systemd-resolved.service

Update the user permissions  (  If running other than root )

CODE
sudo usermod -a -G microk8s $USER
sudo chown -f -R $USER ~/.kube

Wait for the microk8s to bootstrap properly

CODE
microk8s status --wait-ready


Install Addons for the microk8s

Enable helm

CODE
microk8s enable helm3

Enable local-Storage

CODE
microk8s enable hostpath-storage

Enable dns 

CODE
microk8s enable dns 

Enable metrics-server

CODE
microk8s enable metrics-server

Enable metallb

CODE
microk8s enable metallb

when requested for the IP Range, please enter the primary IP of your System as IP-IP or IP/32 format. for example if your main IP is 192.168.2.230, you can enter 192.168.2.230-192.168.2.230 or 192.168.2.230/32, 

OR

if you have an IP Range , enter the range like 192.168.2.230-192.168.2.239

You can use this command to get the IP Address ip route get $(ip route show 0.0.0.0/0 | grep -oP 'via \K\S+') | grep -oP 'src \K\S+' ( approx )


Disable the existing helm command ( if you already had deployed helm in k3s )

microk8s comes with its own helm command, so we need to disable the external helm

CODE
mv /usr/local/bin/helm{,-orig}

Microk8s commands aliases

If you had previously deployed the K3s , edit your $HOME/.bashrc  file  and remove the line K3SCONFIG=/var/lib/rancher/k3s.yaml  and add these aliases 

CODE
alias kubectl='microk8s kubectl'
alias k='microk8s kubectl'
alias helm='microk8s helm3'

source .bashrc

CODE
source $HOME/.bashrc

update the .kube/config with microk8s config

CODE
microk8s.kubectl config view > $HOME/.kube/config



Once ready check the status of your cluster by running

CODE
k get pods -A


Deploy the Traefik 

change the directory 

CODE
cd cim-solution/kubernetes

deploy the traefik helm chart


CODE
helm upgrade --install=true  --wait=true --debug  --namespace=traefik-ingress --create-namespace --values=external/traefik/values.yaml traefik  external/traefik



You can now deploy the CIM Solution using this document  Expertflow CX Deployment on Kubernetes




JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.