Skip to main content

Run Kubeflow

Learn how to run Kubeflow

Kubeflow is an open-source machine learning platform that runs on Kubernetes, providing tools for the complete ML lifecycle from development to deployment.

This guide shows you how to set up Kubeflow on CKS by covering the following:

  • Configuring your cluster for Kubeflow compatibility
  • Installing certificate management components
  • Deploying Kubeflow using the default OSS manifests
  • Accessing the Kubeflow dashboard

Prerequisites

Before installing Kubeflow, ensure you have the following:

  • A Kubernetes cluster on CoreWeave accessible with kubectl
  • kustomized installed and configured to work with your cluster

Setup

  1. Clone the Kubeflow manifests repository and navigate to it by running the following commands:

    Example
    $
    git clone --depth 1 --branch v1.10.1 https://github.com/kubeflow/manifests.git
    $
    cd manifests
  2. Edit the Cilium Config by running the following command:

    Example
    $
    kubectl edit -n cw-cilium-system cm cilium-config

    Add the following value and then save and exit:

    Example
    bpf-lb-sock-hostns-only: "true"

    For example, the cilium-config file section should look similar to this:

    bpf-lb-mode: dsr
    bpf-lb-sock: "false"
    bpf-lb-sock-hostns-only: "true"
    bpf-lb-sock-terminate-pod-connections: "false"
    bpf-map-dynamic-size-ratio: "0.0025"
    bpf-policy-map-max: "16384"

    Apply the changes by running the following command:

    Example
    $
    kubectl rollout restart -n cw-cilium-system ds cilium

    Note: Disregard deprecation warnings.

  3. Install cert-manager and the cert-issuer by running the following commands:

    Example
    $
    kustomize build common/cert-manager/base | kubectl apply -f -
    $
    kustomize build common/cert-manager/kubeflow-issuer/base | kubectl apply -f -
  4. Install Kubeflow using the OSS default manifests by running the following commands:

    Example
    while ! kustomize build example | kubectl apply --server-side --force-conflicts -f -; do echo "Retrying to apply resources"; sleep 20; done

Using Kubeflow

Once Kubeflow is installed, you can access the dashboard and other components. The default namespace for Kubeflow is kubeflow.

The easiest way to start using Kubeflow is to port-forward the main dashboard service by running the following command:

Example
$
kubectl port-forward svc/istio-ingressgateway -n istio-system 8080:80

To view the Kubeflow dashboard go to http://localhost:8080.

The default credentials are used for basic authentication. Access the dashboard using the following credentials:

User: [email protected] Password: 12341234