Skip to main content
Install Kubeflow
Last update:

Install Kubeflow

For your information

The instructions cover the installation of Kubeflow version 1.5. The instructions are also suitable for installing version 1.6

  1. Connect the Selectel ML platform.
  2. Create a cloud server with Linux operating system.
  3. Connect to the cloud server.
  4. Install kustomize on the cloud server.
  5. Install kubectl on the cloud server.
  6. Install Kubeflow on a cloud server.

Connect ML platform

Kubeflow requires a Kubernetes cluster with StorageClass. Connect the ML platform — A ready-to-work Managed Kubernetes cluster will be automatically created.

Recommended versions of the Managed Kubernetes cluster:

KubeflowManaged Kubernetes
1.51.21
1.61.22

Create a cloud server

To install Kubeflow 1.5 you need kustomize version 3.2.0 (for Kubeflow 1.6 you can also use version 3.2.0). The assembled binary for installing kustomize 3.2.0 is available only for Linux and amd64 operating system, so in the instructions we consider installation of all components on a cloud server with Linux.

For your information

If you are using a different CPU architecture or a different operating system, you may have problems using kustomize version 3.2.0

  1. В control panels go to Cloud platformServers.

  2. Click Create a server.

  3. In the block Source click Choose another source and select a ready-made image with a Linux operating system (for example, Ubuntu 18.04).

  4. Select the server boot disk. You can select:

    We recommend using a disk size of at least 5 GB (minimum available size) — the cloud server requires space for the kustomize binary (~25 MB) and the Kubeflow manifest (~7 MB).

  5. In the block Network select a private subnet with a public IP address. The IP address is needed to connect to the server via SSH.

  6. Create an SSH key and copy the public part of it. In the block Access click Download SSH key and insert the public portion of the key. Press Add key.

  7. Select the rest of the server settings — more details in the instructions Create a cloud server.

  8. Click Create.

Connect to a cloud server

  1. В control panels go to Cloud platformServers.

  2. In the row with the cloud server, copy the value in the column IP address.

  3. Connect to the cloud server via SSH:

    ssh root@<IP_address> -i <path_to_private_key>

    Specify:

    • <IP_address> — The public IP address of the cloud server copied in step 2;
    • <path_to_private_key> — path to the private part of the key.

Install kustomize on a cloud server

Kubeflow 1.5.0 is not compatible with kustomize versions above 4.x — we are looking at installing kustomize version 3.2.0

  1. Upload the binary file with the kustomize distribution to the cloud server:

    wget https://github.com/kubernetes-sigs/kustomize/releases/download/v3.2.0/kustomize_3.2.0_linux_amd64
  2. Install kustomize:

    install -o root -g root -m 0755 kustomize_3.2.0_linux_amd64 /usr/local/bin/kustomize
  3. Verify that kustomize is installed:

    kustomize version

    Response:

    Version: {KustomizeVersion:3.2.0 GitCommit:a3103f1e62ddb5b696daa3fd359bb6f2e8333b49 BuildDate:2019-09-18T16:26:36Z GoOs:linux GoArch:amd64}

Install kubectl on a cloud server

  1. Upload the kubectl distribution to the cloud server:

    curl -LO 'https://dl.k8s.io/release/v1.21.0/bin/linux/amd64/kubectl'
  2. Install kubectl:

    install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
  3. В control panels go to Cloud platformKubernetes.

  4. Open the cluster page → tab Settings.

  5. Click Download kubeconfig.

  6. Disconnect from the cloud server and open the terminal on your local machine.

  7. Copy the configuration file from the local machine to the cloud server:

    scp -i <~/.ssh/id_rsa> <~/Downloads/kubeconfig.yaml> root@<IP_address>:/root/<kubeconfig.yaml>

    Specify:

    • <~/.ssh/id_rsa> — the path on the local machine to the SSH key that was generated in step 6 of the instructions Create a cloud server;
    • <~/Downloads/kubeconfig.yaml> — path on the local machine to the configuration file that was downloaded in step 6;
    • <IP_address> — The public IP address of the cloud server;
    • <kubeconfig.yaml> — name of the configuration file.
  8. Connect to the cloud server.

  9. Check that the configuration file is loaded:

    ls -ailh
  10. Export the configuration file:

    export KUBECONFIG=/root/<kubeconfig.yaml>

    Specify <kubeconfig.yaml> — name of the configuration file.

  11. Check that kubectl is installed:

    kubectl version

    Response:

    Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.0", GitCommit:"cb303e613a121a29364f75cc67d3d580833a7479", GitTreeState:"clean", BuildDate:"2021-04-08T16:31:21Z", GoVersion:"go1.16.1", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.13", GitCommit:"592eca05be27f7d927d0b25cbb4241d75a9574bf", GitTreeState:"clean", BuildDate:"2022-10-12T10:50:48Z", GoVersion:"go1.17.13", Compiler:"gc", Platform:"linux/amd64"}
    WARNING: version difference between client (1.21) and server (1.23) exceeds the supported minor version skew of +/-1
  12. Access the cluster via kubectl:

    kubectl get nodes

    Nodes must be in Ready status.

Install Kubeflow on a cloud server

  1. Install git:

    apt update
    apt install git
  2. Clone the repository with Kubeflow manifests:

    git clone [https://github.com/kubeflow/manifests.git](https://github.com/kubeflow/manifests.git)
  3. Navigate to the manifest folder:

    cd manifests/
  4. Open a branch:

    git checkout v1.5-branch
  5. Make sure the correct branch is open:

    git branch -a

    Response:

    master

    * v1.5-branch
  6. Install the official Kubeflow components:

    while ! kustomize build example | kubectl apply -f -; do echo "Retrying to apply resources"; sleep 10; done
  7. Check that all namespaces are active:

    kubectl get namespaces
  8. If installation errors occur, install the components separately — use the Kubeflow documentation.

  9. Check that all components are active — they should have a Running status:

    kubectl get pods -n auth
    kubectl get pods -n cert-manager
    kubectl get pods -n istio-system
    kubectl get pods -n knative-eventing
    kubectl get pods -n kserve
    kubectl get pods -n knative-serving
    kubectl get pods -n kubeflow
    kubectl get pods -n kubeflow-user-example-com
  10. Reroute the ports:

    kubectl port-forward svc/istio-ingressgateway -n istio-system 8080:80
  11. Open a page in your browser http://localhost:8080

  12. To connect to Kubeflow, enter the default login credentials (user@example.com) and password (12341234).