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.0 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. Clone the [opendatahub/manifests] (https://github.com/opendatahub-io/manifests) repository. This repository defaults to the v1.0-branch-openshift branch.

    1. git clone https://github.com/opendatahub-io/manifests.git
    2. cd manifests
  2. Build the deployment configuration using the OpenShift KFDef file and local downloaded manifests.

    Update the manifest repo URI. Copy the KFDef file to the Kubeflow application directory. And finally build the configuration.

    1. # update the manifest repo URI
    2. sed -i 's#uri: .*#uri: '$PWD'#' ./kfdef/kfctl_openshift.yaml
    3. # set the Kubeflow application diretory for this deployment, for example /opt/openshift-kfdef
    4. export KF_DIR=<path-to-kfdef>
    5. mkdir -p ${KF_DIR}
    6. cp ./kfdef/kfctl_openshift.yaml ${KF_DIR}
    7. # build deployment configuration
    8. cd ${KF_DIR}
    9. kfctl build --file=kfctl_openshift.yaml
  3. Apply the generated deployment configuration.

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

    1. $ oc get pods -n kubeflow
    2. NAME READY STATUS RESTARTS AGE
    3. argo-ui-7c584fc474-k5blx 1/1 Running 0 3m46s
    4. centraldashboard-678f74d985-rblnm 1/1 Running 0 3m41s
    5. jupyter-web-app-deployment-57977c6965-2qznb 1/1 Running 0 3m37s
    6. katib-controller-fddbb4864-fdzf5 1/1 Running 1 3m4s
    7. katib-db-6b9b5bc446-6pbtp 1/1 Running 0 3m3s
    8. katib-manager-7797db7f7c-p5ztb 1/1 Running 1 3m3s
    9. katib-ui-5bdbb97475-585rp 1/1 Running 0 3m2s
    10. metadata-db-c88c9bf6f-5ddbz 1/1 Running 0 3m30s
    11. metadata-deployment-969879b6c-swvqf 1/1 Running 0 3m30s
    12. metadata-envoy-deployment-69766744b5-75t5l 1/1 Running 0 3m29s
    13. metadata-grpc-deployment-578956fc6d-msvj5 1/1 Running 3 3m29s
    14. metadata-ui-57f9b8d667-dckm4 1/1 Running 0 3m28s
    15. minio-784784b9bb-bqslk 1/1 Running 0 2m56s
    16. ml-pipeline-687969b966-wx6jd 1/1 Running 0 2m59s
    17. ml-pipeline-ml-pipeline-visualizationserver-57997bdc64-jw6l4 1/1 Running 0 2m37s
    18. ml-pipeline-persistenceagent-b74f6455b-z9nzw 1/1 Running 0 2m51s
    19. ...
  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

Last modified 08.10.2020: Fix minor documentation typos (#2256) (f391d15b)