Microk8s for Kubeflow

    This document outlines the steps that you can take to get your localinstallation of Kubeflow running on top of Microk8s, a single-node Kubernetes cluster. Microk8s requires Linux; if you are not on a Linux system, you can use Multipass to create a Linux VM on your native hypervisor.

    By the end of this document, you’ll have a local installation of a Kubernetes cluster along with all the default core components of Kubeflow deployed as services in the pods. You can access the Kubeflow dashboard, Jupyter notebooks, and dashboards of other Kubeflow components.

    If you already have Ubuntu or Linux, you can easily install Kubernetes using Microk8s. You can jump to the section below on Install Kubeflow using Microk8s.

    If you don’t have a Linux system already, or you would like to confine your Kubeflow to a disposable machine, then follow the instructions below on Create a VM with Multipass first. That will get you an Ubuntu machine that can be used to install Kubernetes and Kubeflow.

    Here’s a consolidated list of instructions to launch a VM, install Kubernetes, and install Kubeflow, all with default settings:

    is a general purpose command line interface (CLI) that launches Ubuntu virtual machines based on cloud-images. The benefits of using Multipass include the following:

    • quickly create disposable machine learning appliances
    • leverage the same cloud images locally, reducing surprises when changing from development to staging to production environments in a multi-cloud strategy.

    Here’s a summary of the steps involved:

    • Install the CLI
    • Use the CLI to create a VM
    • Enter the VM

    1. Install Multipass

    Mac OS X

    Install Multipass using the native Mac OS installer:

    • Download the latest *-Darwin.pkg

    Linux

    Install Multipass using :

    The following command creates a VM with 8GB of memory, 40GB of disk space, and 4 CPU. These are the minimum recommended settings. You are free to adjust them higher based on your host machine capabilities and workload requirements.

    3. Enter the VM

    1. $ multipass shell kubeflow

    Here’s a summary of the steps involved:

    • Set up Microk8s
    • Set up Kubeflow

    This will install Microk8s if it doesn’t already exist, and enable services that are useful for Kubeflow. Please inspect setup-microk8s.sh for more information.

    If you would like access to the Kubernetes dashboard, please run this command:

    2. Install and Setup Kubeflow

    The current approach leverages ksonnet to setup and install Kubeflow. The kubeflow-tools repository contains scripts to facilitate this.

    This script will print out the port number for Ambassador and for Jupyter notebookservers.(Note: you can access your Jupyter notebook server through Ambassador).

    1. - http://<kubeflow VM IP>:<Ambassador PORT>
    2. - http://localhost:<Ambassador PORT>