Deploy Charmed MLflow to Charmed Kubernetes on AWS





This guide shows how to connect Juju to an existing Charmed Kubernetes (CK8s) cluster and deploy the MLflow bundle on top of it.


We assume that you have access to a CK8s cluster using kubectl. If you don’t have a cluster set up, you can follow this guide: Create CK8s on AWS.

Install Juju

Install Juju:

sudo snap install juju --classic --channel=2.9/stable

Connect Juju to Charmed Kubernetes cluster

Configure Juju to communicate with the CK8s cluster by creating a controller:

juju add-k8s charmed-k8s-aws --controller $(juju switch | cut -d: -f1) \

Create a model. The model name is up to you. However, if you plan to connect MLflow with Kubeflow you must use kubeflow as the model name.

juju add-model kubeflow charmed-k8s-aws

Deploy MLflow bundle

Deploy the MLflow bundle:

juju deploy mlflow --channel=2.1/stable --trust

Wait until the deployments are active:

juju-wait -m kubeflow -t 2700

Connect to MLflow dashboard

By default, the MLflow UI is exposed as a NodePort Kubernetes service, accessible at each node’s IP address. MLflow runs on port 31380 by default. AWS nodes are EC2 instances. To connect to an instance, it must be configured to allow traffic to this port.

You can connect to any EC2 instance in the cluster. List all available nodes in your Kubernetes cluster and choose any EXTERNAL-IP that you will use to access the MLflow UI:

kubectl get nodes -o wide

In your AWS account find the EC2 instance with that particular EXTERNAL-IP and enable access to the port 31380 in the inbound rules of the security group. To see how, consult AWS docs.

Open a web browser and visit <nodes-ip-address>:31380 to access the MLflow UI.