How to install Charmed Kubeflow on Kubernetes

Charmed Kubeflow (CKF) can be installed on any CNCF certified Kubernetes, including AKS, EKS, GKE, Openshift and any kubeadm-deployed cluster.

Contents:

  1. Prerequisites
  2. Bootstrap Juju
  3. Create a model called kubeflow
  4. Deploy the kubeflow bundle
  5. Access the Kubeflow dashboard

Prerequisites

It is assumed you have a Kubernetes cluster running. The cluster must meet these requirements:

  • be version 1.22, 1.23, or 1.24
  • have a (default) storage class configured
  • have dns configured
  • for accessing the dashboard, have a LoadBalancer and Ingress

Bootstrap Juju

Charmed Kubeflow is deployed to Kubernetes (K8s) with Juju. Before deployment, Juju must first be bootstrapped to the K8s cluster. For bootstrapping instructions, see Juju OLM | Get started wtih the Juju OLM.

Create a model called kubeflow

To create a Juju model for Charmed Kubeflow, run:

juju add-model kubeflow
Caution:

The model name must be kubeflow for deploying Charmed Kubeflow.

See more: Juju OLM | juju add-model

To view the newly created model, run:

juju models

See more: Juju OLM | juju models

Deploy the kubeflow bundle

To deploy the most recent stable version of Charmed Kubeflow:

juju deploy kubeflow --trust

See more: Charmhub | kubeflow

It may take up to an hour for all charms to become active. To monitor the system with Juju:

watch -c juju status --color

To monitor the K8s pods directly:

watch kubectl get pods -n kubeflow

Access the Kubeflow dashboard

To access the Kubeflow dashboard, you need to find the IP, set the credentials and then use them to log in to the dashboard.

Find the IP address

To find the IP address of the Kubeflow dashboard, run the code:

kubectl get services -n kubeflow

The IP you need is the one attached to the istio-ingressgateway component.

If you’re using MicroK8s, with the typical metallb add-on:
You don’t need to do this. The URL is always http://10.64.140.43.nip.io. Note that, if you have set up DNS, you should use the resolvable address used by istio-ingressgateway.

See more: Kubernetes | kubectl get

Set credentials

Use the IP address you just obtained to set the URL in the dex-auth and oidc-gatekeeper components:

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

Configure dex-auth with a username and password:

juju config dex-auth static-username=<new username>
juju config dex-auth static-password=<new password>

See more: Juju OLM | juju config, Charmhub > dex-auth > Configure

Access the dashboard and log in

The Kubeflow dashboard is acessed using the IP found in the previous step, appending nip.io, for example: http://10.64.140.43.nip.io. If accessing the Dashboard remotely, this URL can be made available over SSH and a SOCKS proxy - see How to setup SSH for steps.


Last updated 6 months ago.