Installing Kubeflow on Windows




1. Introduction

Here's how to install Kubeflow in a Windows environment.

Even if you try to install it as described on the official site, you might encounter errors and have difficulty reaching the dashboard. Therefore, I thought it would be helpful to share some know-how.



2. Prerequisites

The installation procedure is based on the following steps.

https://github.com/kubeflow/manifests#installation


Kubeflow does not support the latest versions, so you need to prepare specific versions.

  1. Kubernetes (up to 1.26)
  2. kustomize (version 5.3.0)
  3. kubectl



3. Installation Method

3.1. Preparing the Linux Environment

Use WSL for the Linux environment. Install WSL from the Microsoft Store.

Please install Ubuntu via command line.

wsl --install Ubuntu-20.04


When you execute the command, Ubuntu will start, and you will set up a username and password.



3.2. Preparing Docker and Kubernetes

3.2.1. Installing Docker Desktop

Install Docker Desktop.

Kubernetes will be used on Docker Desktop.

※As a note, you need to install Kubernetes versions up to 1.26.


Therefore, install Docker Desktop version 4.20.1 from this link.

https://docs.docker.com/desktop/release-notes/


3.2.2. Enabling Kubernetes

Launch Docker Desktop and enable Kubernetes.

  1. Click the 'Settings' icon
  2. Click the Kubernetes tab
  3. Check the checkbox
  4. Click 'Apply & Restart'


This completes the configuration of Kubernetes.



3.3. Preparing kubectl

Prepare kubectl on the Ubuntu environment.

Execute the following commands to download kubectl and make it executable.

$ curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
$ chmod +x ./kubectl
$ sudo mv ./kubectl /usr/local/bin/kubectl


Configure the Kubernetes settings file on Windows to Ubuntu, enabling connection from the Ubuntu environment.

$ mkdir ~/.kube
$ cp /mnt/c/Users/<user name>/.kube/config ~/.kube



3.4. Preparing kustomize

Prepare kustomize on the Ubuntu environment.

As a note, you need to prepare kustomize version 5.3.0.


Execute the following commands to download kustomize and make it executable.

$ curl -LO https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv5.3.0/kustomize_v5.3.0_linux_amd64.tar.gz
$ tar -zxvf kustomize_v5.3.0_linux_amd64.tar.gz
$ chmod +x kustomize
$ sudo mv kustomize /usr/local/bin/kustomize



3.5. Installing Kubeflow

3.5.1. Cloning the Repository

Prepare on the Ubuntu environment.

Clone the following repository.

https://github.com/kubeflow/manifests#installation

$ git clone https://github.com/kubeflow/manifests.git


3.5.2. Installing Kubeflow

This time, we will install all features.

Please refer to the GitHub README if you want to install individual features.

$ cd manifests/
$ while ! kustomize build example | kubectl apply -f -; do echo "Retrying to apply resources"; sleep 10; done


You may see error messages outputted, but as long as the script completes, there is no problem, so wait until it finishes.


You can check if the Kubeflow Pods are up and running with the following command:

It takes some time for all the Pods to start up.

$ kubectl get pods -n kubeflow


This completes the installation of Kubeflow.



4. Accessing the Dashboard

To access the Kubeflow dashboard, execute the following command.

$ kubectl port-forward svc/istio-ingressgateway -n istio-system 8080:80


You can access it at http://localhost:8080.


The initial password is as follows.

email: user@example.com
password: 12341234



For instructions on how to change the password, please refer to the README on GitHub.