1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

KuberflowをIBM Power(ppc64le)上のKubernetesクラスタにデプロイ

1
Posted at

はじめに

本記事では、IBM Power(ppc64le)上に構築したKubernetesクラスタに、Kubeflowをデプロイする手順を示します。
Kubernetesクラスタの構築手順はこちらの記事をご参照下さい。

目次

  1. 検証環境
  2. 前提条件
  3. Kubeflowのデプロイ
  4. アクセス用ポート番号の変更
  5. まとめ
  6. 参考文献

検証環境

以下の2つのKVM環境で構成したKubernetesクラスタに、Kubeflowをデプロイします。

k8s-env.png

前提条件

以下の作業が完了していることを想定しています。

  •  Kubernetesクラスタが構築済み
  •  GPUプラグインがインストール済み
  •  NFSによるボリュームの動的プロビジョニングが設定済み

Kubeflowのデプロイ

kubeflowのインストールにあたって、問題回避のため、kubectlを1.21にアップデートします。

# curl -LO https://dl.k8s.io/release/v1.21.0/bin/linux/ppc64le/kubectl && chmod +x kubectl
# mv /usr/local/bin/kubectl /usr/local/bin/kubectl_v1.19.9
# cp kubectl /usr/local/bin/

ppc64le対応したインストールスクリプトをダウンロードして実行します。 (2022/4/1時点でのmainはv1.5.0 previewとなります)

# KUBEFLOW_VERSION=main
# wget https://raw.githubusercontent.com/lehrig/kubeflow-ppc64le-manifests/${KUBEFLOW_VERSION}/install_kubeflow.sh
# source install_kubeflow.sh

インストールスクリプト実行後、メニュー形式の質問へ回答を入力します。

install_kubeflow.shの実行メニューへの入力例
Which Kubernetes environment do you have admin access to?
(1) Red Hat OpenShift
(2) Vanilla Kubernetes
Selection [1]: 2  << 2を入力

To avoid toomanyrequests errors for Docker.io, do you want to store your Docker.io credentials? [y]: y
Docker.io user name: username        << dockerhubのユーザ名を入力
Docker.io password (input hidden):   << dockerhubのパスワードを入力

Update your .bashrc file with Kubeflow variables (note: this is required if not already present)? [y]: y    << yを入力

Please enter your KUBEFLOW_BASE_DIR (directory where Kubeflow installation files will be stored) [default: /opt/kubeflow]:    << Enterを入力

====================================================
Installation summary
====================================================
- Kubeflow: main
- Kubernetes environment: Vanilla Kubernetes
- externalIpAddress: 192.168.0.1
- Store Docker.io credentials: y
- Update .bashrc file: y
- KUBEFLOW_BASE_DIR: /opt/kubeflow
====================================================
Proceed Kubeflow installation? [y]: y   << yを入力

インストールスクリプトは内部で期待された状態になるまでリトライを繰り返しながら実行します。リトライが何度も繰り返される場合はインストールの前提が満たされていない可能性があります。リトライしながらでも、実行が完了したら、正常にインストールされたかどうかを次の手順で確認します。

kubeflow関係のpodの状態を確認します。(podの種類とREADYの数が下の例と合っていることを確認します。このバージョンでは、KFServingはうまく起動しないようです)

# kubectl get pods -n kubeflow
NAME                                                         READY   STATUS             RESTARTS   AGE
admission-webhook-deployment-5bfc979f48-w98k6                1/1     Running            0          28m
centraldashboard-868ccf78f-fbrpg                             2/2     Running            0          28m
jupyter-web-app-deployment-9c844dc6-sp7dj                    1/1     Running            0          28m
katib-controller-5ddc56bbbc-h9nn9                            1/1     Running            0          28m
katib-db-manager-6b74b8df4c-4whq7                            1/1     Running            0          28m
katib-mysql-55c6c4ff77-k58vt                                 1/1     Running            0          28m
katib-ui-df5d86669-8jsjd                                     1/1     Running            0          28m
kfserving-controller-manager-0                               1/2     CrashLoopBackOff   9          28m
kfserving-models-web-app-67ccb96c77-tfz29                    2/2     Running            0          28m
kserve-models-web-app-f64695c69-gxvz7                        2/2     Running            0          28m
kubeflow-pipelines-profile-controller-685b7b77bc-6ddx7       1/1     Running            0          28m
metacontroller-0                                             1/1     Running            0          28m
metadata-envoy-deployment-75c4fc55cb-94pvm                   1/1     Running            0          28m
metadata-grpc-deployment-5d4fbc5b6-dk5cc                     2/2     Running            2          28m
metadata-writer-8b944b567-gvmf7                              2/2     Running            0          28m
minio-6999d6dd4-2g74l                                        2/2     Running            0          28m
ml-pipeline-99c795f9c-7hfjt                                  2/2     Running            1          28m
ml-pipeline-persistenceagent-5b94b465df-c52fj                2/2     Running            0          28m
ml-pipeline-scheduledworkflow-6767868894-mdpzm               2/2     Running            0          28m
ml-pipeline-ui-88c56d9d7-ll4zr                               2/2     Running            0          28m
ml-pipeline-viewer-crd-74554b9659-8x877                      2/2     Running            1          28m
ml-pipeline-visualizationserver-586cffd768-l5vnj             2/2     Running            0          28m
mysql-78876fb544-zb7q9                                       2/2     Running            0          28m
notebook-controller-deployment-6d659747bd-ft7bl              2/2     Running            1          28m
profiles-deployment-778f7c8d5-27zmq                          3/3     Running            1          28m
tensorboard-controller-controller-manager-64487d9d7d-n9xgr   3/3     Running            2          28m
tensorboards-web-app-deployment-66ff676678-x7gb9             1/1     Running            0          28m
training-operator-77f7965d6c-fk2l7                           1/1     Running            0          28m
volumes-web-app-deployment-5b65764865-kx472                  1/1     Running            0          28m
workflow-controller-64df6f6669-zgb5f                         2/2     Running            2          28m

# kubectl get pods -n kubeflow-user-example-com
NAME                                               READY   STATUS    RESTARTS   AGE
ml-pipeline-ui-artifact-655597b99d-xtf74           2/2     Running   0          2d3h
ml-pipeline-visualizationserver-576c54bd9b-bdt27   2/2     Running   0          2d3h

正常性が確認できたら、インストールスクリプトの最後の出力のログイン情報を確認します。

Next:
1. Go to: https://192.168.0.1:31695
2. If a custom certificate (e.g, istio-ingressgateway.istio-system.svc) certificate as trusted (or type "thisisunsafe" into your browser)
3. Login using the default account:
  - Username: user@example.com
  - Password: 12341234

ブラウザから上記URLにアクセスし、ログイン情報を使ってログインします。
kubeflow-login.png

KubeflowのDashboard左上のProfileが"kubeflow-user-example-com"となっていることを確認
kubeflow-dashboard.png

アクセス用ポート番号の変更

上記の例では、アクセス用ポート番号が31695となっていて、このポート番号を固定したい場合、まずistio-ingressgatewayの設定情報をファイルに保存します。

# kubectl get svc -n istio-system istio-ingressgateway -o yaml > istio-ingressgateway.yaml

保存したyamlファイルを編集し、httpsの箇所のポート番号を希望の番号に変更します。 (下の例では、30000に変更)

istio-ingressgateway.yaml
  - name: https
    nodePort: 30000
    port: 443
    protocol: TCP
    targetPort: 8443

変更した設定を有効化します。

# kubectl apply -f istio-ingressgateway.yaml
# kubectl get pods -A -o wide | grep dash
# kubectl get svc -n istio-system istio-ingressgateway

まとめ

今回はIBM Power(ppc64le)上に構築したKubernetesクラスタにKubeflowをデプロイしました。次回はKubeflowからJupyter Serverを実行したり、ユーザのQuota管理を行いたいと思います。

参考文献

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?