Install Kubeflow on OpenShift

Instructions for deploying Kubeflow on an OpenShift cluster from the command line

This guide describes how to use the kfctl CLI to deploy Kubeflow 1.3 on an existing OpenShift 4.x cluster.

Prerequisites

OpenShift 4 cluster

  • You need to have access to an OpenShift 4 cluster as cluster-admin to be able to deploy Kubeflow.
  • You can use Code Ready Containers (CRC) to run a local cluster, use try.openshift.com to create a new cluster or use an existing cluster.
  • Install oc command-line tool to communicate with the cluster.

Code Ready Containers

If you are using Code Ready Containers, you need to make sure you have enough resources configured for the VM:

Recommended:

  1. 16 GB memory
  2. 6 CPU
  3. 45 GB disk space

Minimal:

  1. 10 GB memory
  2. 6 CPU
  3. 30 GB disk space (default for CRC)

Installing Kubeflow

Use the following steps to install Kubeflow 1.0 on OpenShift 4.x.

  1. Download the example “kfdef” for Kubeflow 1.3 on Openshift from [kubeflow/manifests/distributions/kfdef] (https://raw.githubusercontent.com/kubeflow/manifests/master/distributions/kfdef/kfctl_openshift_v1.3.0.yaml)).

  2. Build the deployment configuration using the example OpenShift KFDef file.

    Create a directory and copy the KFDef file to it. And finally build the configuration.

    1. # set the Kubeflow application directory for this deployment, for example /opt/openshift-kfdef
    2. export KF_DIR=<path-to-kfdef>
    3. mkdir -p ${KF_DIR}
    4. cp kfctl_openshift_v1.3.0.yaml ${KF_DIR}
    5. # build deployment configuration
    6. cd ${KF_DIR}
    7. kfctl build --file=kfctl_openshift_v1.3.0.yaml
  3. Apply the generated deployment configuration.

    1. kfctl apply --file=kfctl_openshift_v1.3.0.yaml
  4. Wait until all the pods are running.

    1. $ oc get pods -n kubeflow
    2. NAME READY STATUS RESTARTS AGE
    3. admission-webhook-deployment-6748884cff-wb7kp 1/1 Running 0 42h
    4. cache-deployer-deployment-799f449d59-5zl2l 1/1 Running 0 42h
    5. cache-server-67849767c5-7w44j 1/1 Running 0 42h
    6. centraldashboard-78f95899fc-8rt8k 1/1 Running 0 42h
    7. metadata-envoy-deployment-67fd74f564-tsrxm 1/1 Running 0 42h
    8. metadata-grpc-deployment-9d547547d-g9cq7 1/1 Running 0 42h
    9. metadata-writer-7776fc6f6f-4f4hp 1/1 Running 0 42h
    10. minio-5cb67d5f6d-l9665 1/1 Running 0 42h
    11. ml-pipeline-6d4fbc667b-hhqsw 1/1 Running 0 42h
    12. ml-pipeline-persistenceagent-667c448c65-r9sn5 1/1 Running 0 42h
    13. ml-pipeline-scheduledworkflow-5b9769fc8b-s9nt8 1/1 Running 0 42h
    14. ml-pipeline-ui-6f9f496b7-9rr4s 1/1 Running 0 42h
    15. ml-pipeline-viewer-crd-77ccffd6d4-n4x55 1/1 Running 0 42h
    16. ml-pipeline-visualizationserver-6c7b448b99-5ttn4 1/1 Running 0 42h
    17. mysql-7659b8f58c-npr57 1/1 Running 0 42h
    18. profiles-deployment-7c8446984b-nvvh7 2/2 Running 0 42h
    19. workflow-controller-7899f6947-gz7km 1/1 Running 0 42h
    20. ...
  5. The command below looks up the URL of the Kubeflow user interface assigned by the OpenShift cluster. You can open the printed URL in your browser to access the Kubeflow user interface.

    1. oc get routes -n istio-system istio-ingressgateway -o jsonpath='http://{.spec.host}/'

Next steps

  • See how to uninstall your Kubeflow deployment using the CLI.

Last modified 23.04.2021: Updating documentation for KF 1.3 on Openshift (#2647) (383053c7)