Install Kubeflow

The Juju Operator Lifecycle Manager leverages the concept of Kubernetes charm operators and provides easy operations (install, upgrade, integrate, remove) for your Kubeflow applications.

The following steps allow you to install Kubeflow on any Kubernetes, provided that you have access to it with kubectl.

Note: If you are installing Kubeflow on top of MicroK8s, there is a specific add-on which will install and configure Kubeflow for you. See the instructions in the MickroK8s documentation.

1. Install the Juju OLM

snap install juju --classic

Alternatively, you can brew install juju on macOS or download the Juju installer for Windows. If you are running a version of Linux which doesn’t yet support snap packages, see the Juju install page.

2. Point Juju at your Kubernetes cluster

If your kubectl config file is in the standard location (~/.kube/config on Linux), and you only have one k8s cluster, you can simply run:

juju add-k8s myk8scloud

If your kubectl config file contains multiple clusters, you can specify the appropriate one by name:

juju add-k8s myk8scloud --cluster-name=juju-cluster

To use a different config file, you can set the KUBECONFIG environment variable to point to the relevant file. For example:

KUBECONFIG=path-to-kubuconfig-file juju add-k8s myk8scloud --cluster-name=my_cluster_name

For more details, see the Juju documentation.

3. Create a controller

To operate in the cluster, Juju needs to create a controller with the bootstrap command:

juju bootstrap myk8scloud my-controller

You can read more about controllers in the Juju documentation.

4. Create a model

A Juju model is a blank canvas where your charm operators will be deployed. While creating a model, you can specify a name, e.g. kubeflow, and your Kubeflow applications will be deployed into a Kubernetes namespace with that name.

Create a Juju model with the command:

juju add-model kubeflow

5. Deploy Kubeflow

Once you have a model, it is possible to juju deploy any of the Kubeflow bundles into your cluster.

To deploy the full kubeflow bundle, it is recommended that you have at least 2 CPUs, 14Gb of free RAM, and 50Gb of disk available on your Linux machine or VM. If you have fewer resources consider deploying either the kubeflow-lite or kubeflow-edge bundles.

For the Kubeflow lite bundle, run:

juju deploy kubeflow-lite

Congratulations, Kubeflow is now installing!

You can observe your Kubeflow deployment getting spun-up with the command:

watch -c juju status --color


There are currently a few manual steps to apply after deployment:

# Patch the role for istio-ingressgateway in RBAC-enabled clusters
kubectl patch role -n kubeflow istio-ingressgateway-operator -p '{"apiVersion":"","kind":"Role","metadata":{"name":"istio-ingressgateway-operator"},"rules":[{"apiGroups":["*"],"resources":["*"],"verbs":["*"]}]}'

# Set the public-url for dex-auth and oidc-gatekeeper
juju config dex-auth public-url=http://<URL>
juju config oidc-gatekeeper public-url=http://<URL>

Where <URL> is the hostname that Kubeflow dashboard responds to. On MicroK8s with the default MetalLB configuration, this should be set to Accepts the hostname with or without a port set, such as foo.lan or foo.lan:8080.

If you set this to a hostname that’s not publicly accessible and you’re on MicroK8s, you will need to adjust MicroK8s’ DNS setup. For example, if you enable this addon on a machine named foo.lan, and you have a DNS service set up at, you will need to run this command:

microk8s.kubectl edit configmap -n kube-system coredns

And edit the line that says forward . to say forward . This will allow CoreDNS to resolve your LAN hostnames within MicroK8s.


If you face any difficulties following these instructions, please create an issue here.

Last updated 12 days ago.