In this guide you will create an AWS EKS cluster, setup Juju on it, deploy the MLflow and Kubeflow bundles and relate them to each other.
Requirements:
- Ubuntu 22.04 or later
- An AWS account (How to create an AWS account)
Deploy EKS cluster
See here for a complete guide on how to do exactly that. Do not forget to edit the instanceType
field under managedNodeGroups[0].instanceType
from t2.2xlarge
to t3.2xlarge
, as instructed in the guide, since worker nodes of type t3.2xlarge are required for deploying both MLFlow and Kubeflow.
Setup Juju
First, install Juju with:
sudo snap install juju --classic
Next, connect it to the Kubernetes (we chose the name kubeflow
, but you can choose any other name).
juju add-k8s kubeflow
Now create the controller (we chose the name kubeflow-controller
, but you can choose any other name).
juju bootstrap --no-gui kubeflow kubeflow-controller
Create a Juju model by running:
juju add-model kubeflow
Deploy Mlflow bundle
Now deploy MLflow bundle with the following command:
juju deploy mlflow --channel=2.15/stable --trust
Wait until all charms are in active state. You can check the state of the charms with:
juju status --watch 5s
Deploy Kubeflow
Now deploy Kubeflow bundle with the following command:
juju deploy kubeflow --channel=1.9/stable --trust
Wait until all charms are in active state. You can check the state of the charms with:
juju status --watch 5s
Relate MLflow to Kubeflow
To run MLflow seamlessly with Kubeflow, deploy the resource-dispatcher
charm with:
juju deploy resource-dispatcher --channel edge --trust
Resource dispatcher is responsible for configuring MLflow to relate Kubernetes objects for Kubeflow user namespaces. Relate resource dispatcher to the MLflow server with the following commands:
juju relate mlflow-server:secrets resource-dispatcher:secrets
juju relate mlflow-server:pod-defaults resource-dispatcher:pod-defaults
Wait until all charms are in active state. You can check the state of the charms with command:
juju status --watch 5s
Configure Kubeflow dashboard
To enable authentication for the dashboard, set a username and password as follows:
juju config dex-auth static-password=user123
juju config dex-auth static-username=user123@email.com
To find the IP address associated with your deployment, run the following command:
microk8s kubectl -n kubeflow get svc istio-ingressgateway-workload -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
You should see an output like this: 10.64.140.43
, which is the default IP address used in the MicroK8s configuration.
To access your deployment, open a browser and visit the dashboard IP. You should see the login page where you need to enter the credentials previously set up.