Author: - Post Category: AI/ML, Resources - Date:January 28, 2019

Kubernetes cluster quick deployment using Minikube for Kubeflow on Ubuntu using VirtualBox

What is Kubernetes? Kubernetes (k8s) is an open-source system for automating deployment, scaling, and management of containerized applications. It groups containers that make up an application into logical units for easy management and discovery. Kubernetes builds upon 15 years of experience of running production workloads at Google, combined with best-of-breed ideas and practices from the

Kubernetes dashboard

What is Kubernetes?

Kubernetes (k8s) is an open-source system for automating deployment, scaling, and management of containerized applications.
It groups containers that make up an application into logical units for easy management and discovery. Kubernetes builds upon 15 years of experience of running production workloads at Google, combined with best-of-breed ideas and practices from the community.

What is Kubeflow?

“Quickly get running with your ML Workflow”

The Kubeflow project is dedicated to making deployments of machine learning (ML) workflows on Kubernetes simple, portable and scalable. The Kuberflow goal is not to recreate other services, but to provide a straightforward way to deploy best-of-breed open-source systems for ML to diverse infrastructures. Anywhere you are running Kubernetes, you should be able to run Kubeflow

Minikube setup

Minikube setup is one of the two Kubernetes clusters environments options available to the user to deploy Kubernetes locally. The alternative is Microk8s setup for Local and Kubernetes setup engine for Cloud .
(https://www.kubeflow.org/docs/started/getting-started/)

Why Minikube setup?

  • Minikube leverages virtualization applications like Virtual Box or VMware Fusion to host the virtual machine and provides a CLI that can be leveraged outside of the VM.
  • Minikube defines a fully baked ISO that contains a minimal operating system and kubernetes already installed.
  • This option may be useful if you are just starting to learn and already have one of the virtualization applications already installed.

What is Minikube for Kubeflow?

It’s a quick way to get Kubeflow running locally.

Below the steps you can take to get your local installation of Kubeflow running on top of Minikube.
Minikube runs a simple, single-node Kubernetes cluster inside a virtual machine (VM).

By the end of this test, you’ll have a local installation of Minikube kubernetes cluster along with all the default core components of Kubeflow deployed as services in the pods.
You should be able to access JupyterHub notebooks, and the Kubeflow Dashboard.

Quick Setup

Given we have Virtualbox already installed on our local environment we can jump to the quick setup section ( if not see the documentation ) and simply run from the Local terminal:

export KUBEFLOW_TAG=v0.4.1
curl -O https://raw.githubusercontent.com/kubeflow/kubeflow/${KUBEFLOW_TAG}/scripts/setup-minikube.sh
chmod +x setup-minikube.sh
./setup-minikube.sh

 

Then you need to install Kubectl

curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.10.0/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/

 

Now you can use these two command line tools and explore all commands available to you.

Try typing into the terminal:

kubectl

Then try:

minikube

If they work you will get a list of available commands.

Use the minikube cli utility to Open/display the kubernetes dashboard URL for your local cluster

minikube dashboard

Starts a local kubernetes cluster
minikube start
Gets the status of a local kubernetes cluster
minikube status
Stops a running local kubernetes cluster
minikube stop

The Kubeflow Dashboard

Now you can access the Kubeflow dashboard at http://localhost:8080/ and JupyterHub at http://localhost:8080/hub/. For JupyterHub, you’ll be landing on a login page.

  • Use any username and password to login
  • Pick an available CPU tensorflow image
  • Provide at least 2 CPUs
  • Provide 4Gi for the memory
  • Leave “Extra Resource Limits” alone for now
  • Click Spawn.
  • You should be redirected to a page that waits while the server is starting.

 

Links:

https://kubernetes.io/

https://www.kubeflow.org/docs/started/getting-started/