Developing and deploying machine learning systems could be a pain with multiple things you need to manage. Kubeflow is designed to make this a whole lot easier for you.

In the past, installing Kubeflow has been quite a tedious task. Through this tutorial, I will show you how you can leverage Civo marketplace to single click deploy Kubeflow with all of its components using the new Kubeflow application I contributed to.

Some background

Kubeflow's goal is to make scaling Machine Learning (ML) models and deploying them to production as simple as possible. This is achieved by letting Kubernetes do what it’s great at. You can think of Kubeflow as a Machine Learning toolkit for Kubernetes.

Kubeflow is already quite popular and used greatly to do Machine Learning processes. The Kubeflow is already quite popular and used greatly to do Machine Learning processes. The 2022 Kubeflow User Survey had a question about identifying the biggest gaps people in the Kubeflow community face. "Installation" was the third largest choice selected by ~31% of the people! The real estimate of people facing this problem is a lot more (due to survivorship bias) since >65% of people are already using Kubeflow in production.

This is a very evident problem in the community as well. Mateusz Kwaśniak said:

It took me a couple of attempts to finally set up Kubeflow on AWS cloud (deploying it in Amazon EKS cluster). A couple of attempts and around 70$ as it turned out later.

There exists some one click deployment solutions for Kubernetes, however, some of them have been either deprecated, do not support the latest Kubeflow versions, deploy MiniKF (Mini Kubeflow), do not offer installation with all components, and / or are just too slow.

What will we see?

In this tutorial, we will see how you can use the UI (or the CLI) to easily install Kubeflow on your Kubernetes Cluster in Civo. To achieve all the aforementioned pain points with installing Kubeflow, we will be using KubeFlow through Civo Marketplace which includes multiple applications you can easily deploy.

install Kubeflow on your Kubernetes Cluster in Civo

Throughout this tutorial, we will be using the Kubeflow application found in Civo's Marketplace. If you are interested, you can read more about my contributions here.

Install using the UI

To begin with, let's see how you can install Kubernetes in a Civo cluster with all of the components of the latest Kubeflow in <5 mins.

You can also use an existing cluster you have in the same way but for this article, I will walk you through creating a new cluster and installing Kubeflow

Create a new cluster using the UI

You can easily create a new cluster from the Civo dashboard. In this example I created a cluster with 4 nodes each of the size "Stanndard Large".

Create a new cluster using the UI

By default, Civo installs the Traefik-v2-nodeport and metrics-server application in a cluster you create. You should now select Kubeflow from the list of applications you are prompted to install when creating a cluster.

Kubeflow on civo marketplace

Now simply click "Create Cluster".

This process will take longer than standard cluster creation since it needs to deploy multiple Kubernetes resources to install Kubeflow.

Verify Kubeflow is running using the UI

Once your clusters created, it could take a while for all the newly created Pods to reach the running state. At this stage, you should make sure all Pods are ready, which can be done by running the following commands after connecting with the Kubernetes cluster:

kubectl get pods -n cert-manager
kubectl get pods -n istio-system
kubectl get pods -n auth
kubectl get pods -n knative-eventing
kubectl get pods -n knative-serving
kubectl get pods -n kubeflow
kubectl get pods -n kubeflow-user-example-com

Connect to Kubeflow using the UI

Now that your pods are all running, you are all set to use Kubeflow!

On the Civo dashboard you will see a Load Balancer named <CLUSTER_NAME>--istio-system-istio-ingressgateway. You should be able to access the Kubeflow dashboard using the DNS name Civo assigns it.

Connect to Kubeflow using the UI

Once you use the DNS name and use the default username user@example.com and default password 12341234, you will be able to access your Kubeflow Central dashboard.

access your Kubeflow Central dashboard

And there you have it... with a couple of clicks, Kubeflow has been deployed for you very quickly!

Install using the CLI

If you plan to use the Kubeflow marketplace app using the Civo CLI, I would first recommend you go through this Civo Cli Documentation highlighting how you can use the Civo CLI.

Create a new Cluster using the CLI

Running the following command creates the same cluster as we created with the UI, and installs the Kubeflow application:

civo kubernetes create kubeflow --size=g3.k3s.large --nodes=4 --applications=kubeflow --wait

Once you do so, you can connect to your Kubernetes cluster using:

civo kubernetes config kubeflow --save

Verify Kubeflow is running using the CLI

Once your cluster is created, it could take a little while for all the newly created Pods to come to the running state. You should make sure all Pods are ready, to check that all Kubeflow-related Pods are ready, run the following commands:

kubectl get pods -n cert-manager
kubectl get pods -n istio-system
kubectl get pods -n auth
kubectl get pods -n knative-eventing
kubectl get pods -n knative-serving
kubectl get pods -n kubeflow
kubectl get pods -n kubeflow-user-example-com

Connect to Kubeflow using the CLI

Now that your pods are running, you are all set to use Kubeflow. You should run the following:

kubectl get svc -n istio-system istio-ingressgateway

This command gives you the external IP for the istio-ingressgateway Load Balancer. This will allow you to access the Kubeflow dashboard using the external IP. Once you use the external IP and use the default username user@example.com and default password 12341234, you will be able to access your Kubeflow Central dashboard.

access your Kubeflow Central dashboard

And there you have it, Kubeflow deployed for you through the CLI with all of its components very quickly!

Conclusion

Thank you for sticking with me until the end. If you learned something new or enjoyed reading this article, please share it so that others can see it. You can also find me on Twitter @rishit_dagli, where I tweet about machine learning, and open-source.