Kubernetes Cluster Setup
Before deploying Akri, you must have a Kubernetes cluster (v1.16 or higher) running with kubectl and Helm installed. Akri is Kubernetes native, so it should run on most Kubernetes distributions. This document provides cluster setup instructions for the three Kubernetes distributions that all of our end-to-end tests run on.
Install Kubernetes Distribution
Reference Kubernetes documentation for instructions on how to install Kubernetes. See Akri's release notes to see what versions of Kubernetes Akri has been tested on.
Install Helm for deploying Akri.
sudo apt install -y curl curl -L https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
Install K3s. The following will install the latest K3s version. Reference Akri's release notes to see what versions of K3s Akri has been tested on.
curl -sfL https://get.k3s.io | sh -Note: Optionally specify a version with the
INSTALL_K3S_VERSIONenv var as follows:curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.21.5+k3s1 sh -Grant admin privilege to access kube config.
sudo addgroup k3s-admin sudo adduser $USER k3s-admin sudo usermod -a -G k3s-admin $USER sudo chgrp k3s-admin /etc/rancher/k3s/k3s.yaml sudo chmod g+r /etc/rancher/k3s/k3s.yaml su - $USERCheck K3s status.
kubectl get nodeInstall Helm.
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml sudo apt install -y curl curl -L https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bashIf desired, add nodes to your cluster by running the K3s installation script with the
K3S_URLandK3S_TOKENenvironment variables. See K3s installation documentation for more details.
Install MicroK8s. The following will install the latest MicroK8s version. Add
--channel=$VERSION/stableto specify as specific Kubernetes version. Reference Akri's release notes to see what versions of MicroK8s Akri has been tested on.Grant admin privilege for running MicroK8s commands.
Check MicroK8s status.
Enable CoreDNS, Helm and RBAC for MicroK8s.
If you don't have an existing
kubectlandhelminstallations, add aliases. If you do not want to set an alias, addmicrok8sin front of allkubectlandhelmcommands.By default, MicroK8s does not allow Pods to run in a privileged context. None of Akri's components run privileged; however, if your custom broker Pods do in order to access devices for example, enable privileged Pods like so:
If desired, reference MicroK8's documentation to add additional nodes to the cluster.
Last updated
Was this helpful?