Deploy Charmed MLflow and Kubeflow to EKS¶
Component |
Version |
MLflow |
2 |
This guide shows how to deploy Charmed MLflow alongside Kubeflow on AWS Elastic Kubernetes Service (EKS). In this guide, we will create an AWS EKS cluster, connect Juju to it, deploy the MLflow and Kubeflow bundles, and relate them to each other.
Prerequisites¶
We assume the following:
Your machine runs Ubuntu 22.04 or later
You have an AWS account (How to create an AWS account)
Deploy EKS cluster¶
See our EKS creation guide for a complete guide on how to do this. 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¶
Set up your local juju
to talk to the remote Kubernetes cloud. First, install Juju with:
sudo snap install juju --classic
Connect it to Kubernetes:
juju add-k8s kubeflow
Create the controller:
juju bootstrap --no-gui kubeflow kubeflow-controller
Note
we chose the name kubeflow-controller
, but you can choose any other name.
Add a Juju model:
juju add-model kubeflow
Deploy MLflow bundle¶
Deploy the MLflow bundle with the following command:
juju deploy mlflow --channel=2.1/stable --trust
Wait until all charms are in the active state. You can check the state of the charms with the command:
juju status --watch 5s --relations
Deploy Kubeflow bundle¶
Deploy the Kubeflow bundle with the following command:
juju deploy kubeflow --channel=1.7/stable --trust
Wait until all charms are in the active state. You can check the state of the charms with the command:
juju status --watch 5s --relations
Relate MLflow to Kubeflow¶
The resource dispatcher is used to connect MLflow with Kubeflow. In particular, it is responsible for configuring MLflow related Kubernetes objects for Kubeflow user namespaces. Deploy the resource dispatcher to the cluster with the command:
juju deploy resource-dispatcher --channel 1.0/stable --trust
Relate the resource dispatcher to MLflow 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 the active state. You can check the state of the charms with the command:
juju status --watch 5s --relations
Configure Kubeflow dashboard¶
Get the hostname from the istio-ingressgateway-workload
Kubernetes load balancer service:
export INGRESS_HOST=$(kubectl get svc -n kubeflow istio-ingressgateway-workload -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
Then, configure OIDC and DEX with the INGRESS_HOST
we just retrieved, and also a username and password of your choosing:
juju config dex-auth public-url="http://${INGRESS_HOST}"
juju config oidc-gatekeeper public-url="http://${INGRESS_HOST}"
juju config dex-auth static-password=user123
juju config dex-auth static-username=[email protected]
Wait until all charms are in the active state. You can check the state of the charms with the command:
juju status --watch 5s --relations
Now you can access the Kubeflow dashboard at the value from INGRESS_HOST
in your browser.