Kubeflow on Windows
After following the Kubeflow project for a while, I decided to try it out. Even though I am an OSX/Mac user, I recently bought a new ThinkPad that came with Windows installed and took this chance to explore what is new in Windows and the Windows Linux Subsystem (WSL).
To test the limits of WSL, why not try to make Kubeflow run on it? That way, I can check if some must-have features like containers, Kubernetes, port-forwarding, etc… are fully available, and how easy is it to make them work.
1. Run Kubernetes on Windows
Before installing Kubeflow, we need a local Kubernetes cluster. Follow the steps on the Run Kubernetes on Windows to have a working local Kubernetes cluster.
2. Installing Kubeflow
Kubeflow’s documentation is very good, but as of today - July 2020 - their official documentation doesn’t provide a way to run it on Kubernetes using the new WLS2. To be fair, it is an edge use case and maybe not very useful for most people. I’m just having fun :person_shrugging:.
I followed the “Instructions for installing Kubeflow on your existing Kubernetes cluster using kfctl_k8s_istio config”. According to the documentation it should be exacly what we need.
creates a vanilla deployment of Kubeflow with all its core components without any external dependencies
All the links I’m providing here are for version 1.1.0
of Kubeflow. This way of installing Kubeflow could be deprecated in the future, but if it isn’t, it should work for any other version.
Kubeflow provides a binary called kfctl
that makes it easier to install all the necessary components.
Here are the commands I followed to install kfctl
:
|
|
With kfctl
installed and a local Kubernetes cluster running, we can now install Kubeflow.
Here are the commands I used to install Kubeflow. I am calling my project testing-kubeflow
and placing all the files under ${HOME}/Projects/kubeflow-test/
.
|
|
These are the pods that result of the installation:
|
|
After Kubeflow is installed, we can get the port for the Kubeflow API and open it in the browser:
|
|
3. Setup Kubeflow
The initial wizard from Kubeflow asks us to create a namespace in the Kubernetes clusters. Kubeflow uses the native Kubernetes
namespaces to provide Multi-user Isolation.
Since we are experimenting, using an anonymous user is enough, and we can accept the anonymous
namespace. Any pods created by Kubeflow run under this namespace.
Lunch a Jupyter notebook server
Now that We have Kubeflow installed, we can create a Jupyter notebook server and try to access its UI to do a simple task.
We click on the Notebook Servers
menu in the sidebar and + New Server
to lunch a new Jupyter server.
After the notebook is created, click CONNECT
to open a notebook.
We can also replace the URL http://localhost:xxx/tree
with http://localhost:xxx/lab
to use Jupyter Lab.
And check which pods are running in our namespace:
|
|
Final thoughts
I am impressed with how easy it is to run a simple development Kubernetes cluster on Windows nowadays.
As for Kubeflow, I did not explore it any further. I searched for some examples in their repository, but all the examples were focused on Google Cloud Services centric or not working at all.
Note that I was experimenting on a Laptop with 16GB of Memory when the minimum requirement for Kubeflow is 12GB (not on Windows). Although it works, I wouldn’t say it is productive at all and, in the future, I want to test Kubeflow in a beefier machine from some cloud provider.