Deploy to a minikube cluster

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.


A virtual machine or server running Ubuntu Server LTS

Add the Docker repository to APT sources

  1. Install the packages needed to use a repository over HTTPS.
    sudo apt-get install ca-certificates curl gnupg lsb-release
  2. Add the official Docker GPG key.
    sudo curl -fsSL | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  3. Add the Docker repository to APT sources.
    echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  4. Update the apt package index.
    sudo apt-get update

Install Docker Engine

  1. Install Docker, containerd, and Docker Compose.
    sudo apt-get install docker-ce docker-ce-cli docker-compose-plugin -y
  2. Start Docker.
    sudo systemctl start docker

Install minikube

  1. Download the minikube Linux binaries.
    curl -LO
  2. Install the minikube binaries in /usr/local/bin/minikube.
    sudo install minikube-linux-amd64 /usr/local/bin/minikube

Install kubectl

  1. Download and install the kubectl Linux binaries.
    sudo snap install kubectl --classic
  2. Check the kubectl version.
    kubectl version --client

Start minikube


Add your user to the docker group.

sudo usermod -aG docker $USER && newgrp docker


  1. Start a minikube cluster.
    minikube start --driver=docker --memory 24000 --cpus 6

    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.

  2. (Optional) Make docker the default driver so that you can start minikube next time without having to specify the docker driver.
    minikube config set driver docker

Create a namespace to install MOSTLY AI

  1. Verify the installation of kubectl by listing your pods and namespaces.
    kubectl get po -A
    The output should be similar to the following listing.
    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
  2. Create a namespace for MOSTLY AI.
    kubectl create ns mostly-ai
  3. Verify the newly created mostly-ai namespace.
    kubectl get ns
    The resulting listing should be similar to the following.
    NAME              STATUS   AGE
    default           Active   3m
    kube-node-lease   Active   3m
    kube-public       Active   3m
    kube-system       Active   3m
    mostly-ai         Active   37s
  4. Set the mostly-ai namespace as the default.
    kubectl config set-context --current --namespace=mostly-ai
    If successful, the result from the command is the following:
    Context "minikube" modified.

Install required minikube addons

  1. Install the NGINX add-on.
    minikube addons enable ingress
  2. Install the volume snapshots add-on.
    minikube addons enable volumesnapshots
  3. Install the CSI hostpath driver add-on.
    minikube addons enable csi-hostpath-driver

Install Helm

  1. Add the Helm GPG key.
    curl | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
  2. Install the APT HTTPS transport to use repositories over HTTPS.
    sudo apt-get install apt-transport-https --yes
  3. Add the Helm repository to APT sources.
    echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
  4. Update the apt package index.
    sudo apt-get update
  5. Install Helm.
    sudo apt-get install helm