Deploy MOSTLY AI to a minikube cluster
One of the options to install MOSTLY AI without the need of a multi-node Kubernetes cluster is to do so on a 1local Kubernetes cluster with minikube
. More specifically, this page covers the steps to install MOSTLY AI on a Ubuntu Server LTS.
Prerequisites
A virtual machine or server running Ubuntu Server LTS
Add the Docker repository to APT sources
- Install the packages needed to use a repository over HTTPS.
sudo apt-get install ca-certificates curl gnupg lsb-release
- Add the official Docker GPG key.
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
- Add the Docker repository to APT sources.
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- Update the
apt
package index.sudo apt-get update
Install Docker Engine
- Install Docker, containerd, and Docker Compose.
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
- Start Docker.
sudo systemctl start docker
Install minikube
- Download the minikube Linux binaries.
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
- Install the minikube binaries in
/usr/local/bin/minikube
.sudo install minikube-linux-amd64 /usr/local/bin/minikube
Install kubectl
- Download and install the
kubectl
Linux binaries.sudo snap install kubectl --classic
- Check the
kubectl
version.kubectl version --client
Start minikube
Prerequisites
Add your user to the docker
group.
sudo usermod -aG docker $USER && newgrp docker
Steps
- Start a minikube cluster.
minikube start --driver=docker --memory 24000 --cpus 6
💡Tip
Use the provided values of 24 GB memory and 6 CPU cores as an example for a small experiment. For all other purposes, increase the values as necessary. - (Optional) Make
docker
the default driver so that you can start minikube next time without having to specify thedocker
driver.minikube config set driver docker
Create a namespace to install MOSTLY AI
- Verify the installation of
kubectl
by listing your pods and namespaces.The output should be similar to the following listing.kubectl get po -A
NAMESPACE NAME READY STATUS RESTARTS AGE kube-system coredns-787d4945fb-qw4r8 1/1 Running 0 1m19s kube-system etcd-minikube 1/1 Running 0 1m32s kube-system kube-apiserver-minikube 1/1 Running 0 1m33s kube-system kube-controller-manager-minikube 1/1 Running 0 1m33s kube-system kube-proxy-bx9kb 1/1 Running 0 1m19s kube-system kube-scheduler-minikub 1/1 Running 0 1m34s kube-system storage-provisioner 1/1 Running 0 1m31s
- Create a namespace for MOSTLY AI.
kubectl create ns mostly-ai
- Verify the newly created
mostly-ai
namespace.The resulting listing should be similar to the following.kubectl get ns
NAME STATUS AGE default Active 3m kube-node-lease Active 3m kube-public Active 3m kube-system Active 3m mostly-ai Active 37s
- Set the
mostly-ai
namespace as the default.If successful, the result from the command is the following:kubectl config set-context --current --namespace=mostly-ai
Context "minikube" modified.
Install required minikube addons
- Install the NGINX add-on.
minikube addons enable ingress
- Install the volume snapshots add-on.
minikube addons enable volumesnapshots
- Install the CSI hostpath driver add-on.
minikube addons enable csi-hostpath-driver
Install Helm
- Add the Helm GPG key.
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
- Install the APT HTTPS transport to use repositories over HTTPS.
sudo apt-get install apt-transport-https --yes
- Add the Helm repository to APT sources.
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
- Update the
apt
package index.sudo apt-get update
- Install Helm.
sudo apt-get install helm