您现在的位置是:首页 > 编程

国内环境一键安装 Kubeflow 1.3

编程作者:chenli日期:2022-01-07 14:26:03点击:575

Kubeflow安装及使用教程(中国版)

由于国内网络问题,Kubeflow 通常安装都是各种磕磕碰碰,以一颗为广大人民谋福利的心,这里提供中国的本地镜像版(阿里云镜像/dockerhub)的安装
同时这里汇总了一些kubeflow的中文教程资料供大家参考。

Kubeflow 使用教程

安装步骤

安装k8s

如果已经有k8s集群,这一步可以跳过,直接到kubeflow安装

kind安装k8s集群

下载kind工具

使用kind安装k8s集群:

  1. $ kind create cluster --config=kind/kind-config.yaml --name=kubeflow --image=kindest/node:v1.16.9

启动成功后可以看到开了一个30001端口:

  1. $ docker ps
  2. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
  3. 5f67af713e28 kindest/node:v1.19.1 "/usr/local/bin/entr…" 3 minutes ago Up 3 minutes 0.0.0.0:30001->30001/tcp, 127.0.0.1:56682->6443/tcp kubeflow-control-plane

由于 kubeflow 实验组件较多,最好准备机器的最低配置能够大于CPU8核,内存32G以上。

安装kubeflow

1.拉取部署代码

  1. https://github.com/1920853199/kubeflow-manifests.git

2.启动

  1. $ python install.py

等待镜像拉取,由于涉及的镜像比较多,要20~30分钟左右,可以通过命令查看是否就绪:

3.查看结果

  1. $ kubectl get pod -nkubeflow
  2. NAME READY STATUS RESTARTS AGE
  3. admission-webhook-deployment-6fb9d65887-pzvgc 1/1 Running 0 19h
  4. cache-deployer-deployment-7558d65bf4-jhgwg 2/2 Running 1 3h54m
  5. cache-server-c64c68ddf-lx7xq 2/2 Running 0 3h54m
  6. centraldashboard-7b7676d8bd-g2s8j 1/1 Running 0 4h46m
  7. jupyter-web-app-deployment-66f74586d9-scbsm 1/1 Running 0 3h4m
  8. katib-controller-77675c88df-mx4rh 1/1 Running 0 19h
  9. katib-db-manager-646695754f-z797r 1/1 Running 0 19h
  10. katib-mysql-5bb5bd9957-gbl5t 1/1 Running 0 19h
  11. katib-ui-55fd4bd6f9-r98r2 1/1 Running 0 19h
  12. kfserving-controller-manager-0 2/2 Running 0 19h
  13. kubeflow-pipelines-profile-controller-5698bf57cf-dhtsj 1/1 Running 0 3h52m
  14. metacontroller-0 1/1 Running 0 4h52m
  15. metadata-envoy-deployment-76d65977f7-rmlzc 1/1 Running 0 4h52m
  16. metadata-grpc-deployment-697d9c6c67-j6dl2 2/2 Running 3 4h52m
  17. metadata-writer-58cdd57678-8t6gw 2/2 Running 1 4h52m
  18. minio-6d6784db95-tqs77 2/2 Running 0 4h45m
  19. ml-pipeline-85fc99f899-plsz2 2/2 Running 1 4h52m
  20. ml-pipeline-persistenceagent-65cb9594c7-xvn4j 2/2 Running 1 4h52m
  21. ml-pipeline-scheduledworkflow-7f8d8dfc69-7wfs4 2/2 Running 0 4h52m
  22. ml-pipeline-ui-5c765cc7bd-4r2j7 2/2 Running 0 4h52m
  23. ml-pipeline-viewer-crd-5b8df7f458-5b8qg 2/2 Running 1 4h52m
  24. ml-pipeline-visualizationserver-56c5ff68d5-92bkf 2/2 Running 0 4h52m
  25. mpi-operator-789f88879-n4xms 1/1 Running 0 19h
  26. mxnet-operator-7fff864957-vq2bg 1/1 Running 0 19h
  27. mysql-56b554ff66-kd7bd 2/2 Running 0 4h45m
  28. notebook-controller-deployment-74d9584477-qhpp8 1/1 Running 0 19h
  29. profiles-deployment-67b4666796-k7t2h 2/2 Running 0 19h
  30. pytorch-operator-fd86f7694-dxbgf 2/2 Running 0 19h
  31. tensorboard-controller-controller-manager-fd6bcffb4-k9qvx 3/3 Running 1 19h
  32. tensorboards-web-app-deployment-78d7b8b658-dktc6 1/1 Running 0 19h
  33. tf-job-operator-7bc5cf4cc7-gk8tz 1/1 Running 0 19h
  34. volumes-web-app-deployment-68fcfc9775-bz9gq 1/1 Running 0 19h
  35. workflow-controller-566998f76b-2v2kq 2/2 Running 1 4h52m
  36. xgboost-operator-deployment-5c7bfd57cc-9rtq6 2/2 Running 1 19h

如果所有pod 都running了表示安装完了。

注:除了kubeflow命名空间,该一键安装工具也会安装istio,knative,因此也要保证这两个命名空间下的服务全部running

全部pod running后,可以访问本地的30001端口(istio-ingress gateway设置了nodeport为30001端口),就可以看到登录界面了:

输入账号密码即可登录,这里的账号密码可以通过patch/auth.yaml进行更改。
默认的用户名是admin@example.com,密码是password

登录后进入kubeflow界面:

删除kubeflow资源

  1. kind delete cluster --name kubeflow

文章评论