You are viewing documentation for Kubeflow 1.5

This is a static snapshot from the time of the Kubeflow 1.5 release.
For up-to-date information, see the latest version.

Charmed Kubeflow deployment guide

Instructions for Kubeflow deployment with Kubeflow Charmed Operators

Get up and running with Charmed Kubeflow in half an hour or less. This guide outlines the steps you need to install and deploy Kubeflow with Charmed Operators and Juju on any conformant Kubernetes, including Azure Kubernetes Service (AKS), Amazon Elastic Kubernetes Service (EKS), Google Kubernetes Engine (GKE), OpenShift, and any kubeadm-deployed cluster (provided that you have access to it via kubectl).

1. Install the Juju client

On Linux, install juju via snap with the following command:

snap install juju --classic

If you use macOS, you can use Homebrew and type brew install juju in the command line. For Windows, download the Windows installer for Juju.

2. Connect Juju to your Kubernetes cluster

To operate workloads in your Kubernetes cluster with Juju, you have to add the cluster to the list of clouds in Juju via the add-k8s command.

If your Kubernetes config file is in the default location (such as ~/.kube/config on Linux) and you only have one cluster, you can simply run:

juju add-k8s myk8s

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

juju add-k8s myk8s --cluster-name=foo

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

KUBECONFIG=path/to/file juju add-k8s myk8s

For more details, go to the official Juju documentation.

3. Create a controller

To operate workloads on your Kubernetes cluster, Juju uses controllers. You can create a controller with the bootstrap command:

juju bootstrap myk8s my-controller --agent-version="2.9.22"

This command will create a couple of pods under the my-controller namespace. You can see your controllers with the juju controllers command.

You can read more about controllers in the Juju documentation.

4. Create a model

A model in Juju is a blank canvas where your operators will be deployed, and it holds a 1:1 relationship with a Kubernetes namespace.

Using the add-model command, create a new model and name it kubeflow (which will then also create a Kubernetes namespace of the same name):

juju add-model kubeflow

You can list your models with the juju models command.

5. Deploy Kubeflow

Once you have a model, you can simply juju deploy any of the provided Kubeflow bundles into your cluster. For the Kubeflow lite bundle, run:

juju deploy kubeflow-lite --trust

and your Kubeflow installation should begin!

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

watch -c juju status --color

6. Set URL in authentication methods

Finally, you need to enable your Kubeflow dashboard access. Provide the dashboard’s public URL to dex-auth and oidc-gatekeeper as follows:

juju config dex-auth public-url=http://<URL>
juju config oidc-gatekeeper public-url=http://<URL>

where in place of <URL> you should use the hostname that the Kubeflow dashboard responds to.

Currently, in order to setup Kubeflow with Istio correctly when RBAC is enabled, you need to provide the istio-ingressgateway operator access to Kubernetes resources. The following command will create the appropriate role:

kubectl patch role -n kubeflow istio-ingressgateway-operator -p '{"apiVersion":"rbac.authorization.k8s.io/v1","kind":"Role","metadata":{"name":"istio-ingressgateway-operator"},"rules":[{"apiGroups":["*"],"resources":["*"],"verbs":["*"]}]}'

More documentation

For more documentation, visit the Charmed Kubeflow website.

Having issues?

If you have any issues or questions, feel free to create a GitHub issue here.

Need 24/7 support?

You can get 24/7 support, expert professional services and managed service backed by an SLA from Canonical, the team behind Charmed Kubeflow. Contact us now to learn more.

Feedback

Was this page helpful?