Add-on: Kubeflow

Note: These instructions still work, but using the add-on to install Kubeflow is no longer the recommended way to get up and running. Instead there is a complete end-to-end tutorial on deploying Kubeflow on MicroK8s now published in the Charmed Kubeflow documentation.

Homepage: https://charmed-kubeflow.io/
Available on MicroK8s version: 1.20 and 1.21
Supported arch: amd64

This addon makes Machine Learning easy by deploying Kubeflow on top of MicroK8s.

Caution: The minimum requirements for Kubeflow are 4 CPUs, 12GB memory and 50GB storage. Be sure your system can support that before enabling it.

microk8s enable kubeflow --bundle=cs:kubeflow

There are several options you can set when enabling Kubeflow. You can run this command to view the list of available options:

microk8s enable kubeflow -- --help

The list of options are shown below. Each one can be passed in as a command-line flag (e.g. --debug), or as a prefixed environment variable (e.g. KUBEFLOW_DEBUG=true)

  • --bundle (or KUBEFLOW_BUNDLE): This determines which bundle is deployed. The three preset options are full, lite, and edge, which correspond to these bundles, respectively:

    https://charmhub.io/kubeflow
    https://charmhub.io/kubeflow-lite
    https://charmhub.io/kubeflow-edge

    Here is more information about each bundle:

    • full: Includes each Kubeflow service. It’s recommended to have at least 14Gb of RAM and 60Gb disk space.
    • lite: Eliminates less-used services from the full bundle, while keeping the user-friendly dashboard. This bundle is oriented towards deploying nicely on a laptop.
    • edge: Includes only training and serving operators, and does not include a dashboard. This bundle is suitable for lower-resource environments.

    You can also directly specify a charm store URL, such as cs:kubeflow-123.

  • --channel (or KUBEFLOW_CHANNEL): Which risk channel to deploy the Kubeflow bundle from. Defaults to stable, and should mostly be left as this value. You can set it to candidate, beta, or edge however, if you want to deploy a bundle that is not yet stable.

  • --debug (or KUBEFLOW_DEBUG): Enables debugging output. Useful for if enabling the addon fails. As a command-line flag, can be set or unset with --debug / --no-debug. As an environment variable, can be set to true or false.

  • --hostname (or KUBEFLOW_HOSTNAME): Sets the hostname that the Kubeflow dashboard responds to. This defaults to http://x.x.x.x.nip.io/, where x.x.x.x comes from MetalLB. Accepts the hostname with or without a port set, such as foo.lan or foo.lan:8080.

    If you set this to a hostname that’s not publicly accessible, you will need to adjust MicroK8s’ DNS setup. For example, if you enable this addon on a machine named foo.lan, and you have a DNS service set up at 192.168.1.1, you will need to run this command:

    microk8s.kubectl edit configmap -n kube-system coredns
    

    And edit the line that says forward . 8.8.8.8 8.8.4.4 to say forward . 192.168.1.1. This will allow CoreDNS to resolve your LAN hostnames within MicroK8s.

  • --ignore-min-mem (or KUBEFLOW_IGNORE_MIN_MEM): It is recommended to have at least 14 Gb of RAM for enabling Kubeflow. If you would like to enable Kubeflow with less RAM than this, pass in the --ignore-min-mem flag, or set the KUBEFLOW_IGNORE_MIN_MEM=true environment variable.

  • --no-proxy (or KUBEFLOW_NO_PROXY): If you have a local proxy setup, you will need to set this option. See How to configure Juju for offline usage - doc - Charmhub for more information.

  • --password (or KUBEFLOW_AUTH_PASSWORD): This will set the password for the Kubeflow dashboard. If not set, a random password will be generated which you will be prompted to accept.

Hello,
Is this documentation up to date?
Using the command sudo microk8s enable kubeflow I’m getting the error This command can't be run as root but running it without it I’m getting ERROR cannot load ssh client keys: open /var/snap/microk8s/1864/juju/share/juju/ssh: permission denied

Looks like the same error as Enable Kubeflow ask for authorization website (Ubuntu One) - access denied · Issue #1843 · ubuntu/microk8s · GitHub

Hello,
I am having a dell emc server setup in my research lab with one master node and 10 worker nodes. In that, three of them are having Nvidia GeForce RTX 2080Ti. I installed Ubuntu 18.04 server OS in all the nodes. I have successfully clustered all the gpu nodes along with one of normal node using microk8s (sudo snap install microk8s --channel=latest/edge --classic). I was also able to deploy Kubeflow without any error. After that, I opened the kubeflow dashboard and tried creating a jupyter notebook with one GPU and 10 CPUs. But there was an error saying I can’t select numeric values in GPU field. here is the screenshot of that error:

Later, I also realized that the allocatable GPU was showing none while running this command: kubectl get nodes “-o=custom-columns=NAME:.metadata.name,GPU:.status.allocatable.nvidia.com/gpu”

Microk8s version: v1.21.1-3+ba118484dd39d

Please guide me how can I resolve this issue.