安装

上手 Volcano 最容易的方式是从 github 下载release ,然后按照以下步骤操作:

准备

  • 一个 Kubernetes 集群,集群版本不低于 V1.13
  • [可选项] 在您的集群中下载 Helm,您可以根据以下指南安装 Helm:安装 Helm。(仅当您使用 helm 模式进行安装时需要)
  • 下载最新版本 volcano下载链接
  • 解压 release 文件
  1. #tar -xvf volcano-{Version}-linux-gnu.tar.gz
  2. #cd volcano-{Version}-linux-gnu
  3. #ll
  4. total 60
  5. drwxr-xr-x 4 root1 root1 4096 Jul 23 11:38 ./
  6. drwxr-xr-x 11 root1 root1 12288 Jul 23 11:37 ../
  7. drwxr-xr-x 3 root1 root1 4096 Jul 16 16:15 bin/
  8. -rw-r--r-- 1 root1 root1 153 Jul 16 16:15 default-queue.yaml
  9. drwxr-xr-x 3 root1 root1 4096 Jul 16 16:15 helm/
  10. -rw-r--r-- 1 root1 root1 4169 Jul 16 16:15 README.md
  11. -rw-r--r-- 1 root1 root1 23453 Jul 16 16:15 volcano-{Version}.yaml

安装方式

通过 Deployment Yaml 文件方式安装

使用 release 内的文件volcano-{Version}.yaml创建 deployment。

  1. # kubectl apply -f volcano-{Version}.yaml
  2. namespace/volcano-system created
  3. configmap/volcano-scheduler-configmap created
  4. serviceaccount/volcano-scheduler created
  5. clusterrole.rbac.authorization.k8s.io/volcano-scheduler created
  6. clusterrolebinding.rbac.authorization.k8s.io/volcano-scheduler-role created
  7. deployment.apps/volcano-scheduler created
  8. serviceaccount/volcano-admission created
  9. clusterrole.rbac.authorization.k8s.io/volcano-admission created
  10. clusterrolebinding.rbac.authorization.k8s.io/volcano-admission-role created
  11. deployment.apps/volcano-admission created
  12. service/volcano-admission-service created
  13. job.batch/volcano-admission-init created
  14. serviceaccount/volcano-controllers created
  15. clusterrole.rbac.authorization.k8s.io/volcano-controllers created
  16. clusterrolebinding.rbac.authorization.k8s.io/volcano-controllers-role created
  17. deployment.apps/volcano-controllers created
  18. customresourcedefinition.apiextensions.k8s.io/jobs.batch.volcano.sh created
  19. customresourcedefinition.apiextensions.k8s.io/commands.bus.volcano.sh created
  20. customresourcedefinition.apiextensions.k8s.io/podgroups.scheduling.incubator.k8s.io created
  21. customresourcedefinition.apiextensions.k8s.io/queues.scheduling.incubator.k8s.io created
  22. customresourcedefinition.apiextensions.k8s.io/podgroups.scheduling.sigs.dev created
  23. customresourcedefinition.apiextensions.k8s.io/queues.scheduling.sigs.dev created

验证 Volcano 各组件的运行状态

  1. # kubectl get all -n volcano-system
  2. NAME READY STATUS RESTARTS AGE
  3. pod/volcano-admission-5bd5756f79-p89tx 1/1 Running 0 6m10s
  4. pod/volcano-admission-init-d4dns 0/1 Completed 0 6m10s
  5. pod/volcano-controllers-687948d9c8-bd28m 1/1 Running 0 6m10s
  6. pod/volcano-scheduler-94998fc64-9df5g 1/1 Running 0 6m10s
  7. NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
  8. service/volcano-admission-service ClusterIP 10.96.140.22 <none> 443/TCP 6m10s
  9. NAME READY UP-TO-DATE AVAILABLE AGE
  10. deployment.apps/volcano-admission 1/1 1 1 6m10s
  11. deployment.apps/volcano-controllers 1/1 1 1 6m10s
  12. deployment.apps/volcano-scheduler 1/1 1 1 6m10s
  13. NAME DESIRED CURRENT READY AGE
  14. replicaset.apps/volcano-admission-5bd5756f79 1 1 1 6m10s
  15. replicaset.apps/volcano-controllers-687948d9c8 1 1 1 6m10s
  16. replicaset.apps/volcano-scheduler-94998fc64 1 1 1 6m10s
  17. NAME COMPLETIONS DURATION AGE
  18. job.batch/volcano-admission-init 1/1 28s 6m10s

一切配置就绪,您可以开始使用 Volcano 部署 AI/ML 和大数据负载了。

使用 Helm 安装

如果您想使用 Helm 部署 Volcano,请先确认已经在您的集群中安装了Helm

步骤 1:

创建一个新的命名空间。

  1. # kubectl create namespace volcano-system
  2. namespace/volcano-system created
步骤 2:

使用 Helm 进行安装。

  1. # helm install helm/chart/volcano --namespace volcano-system --name volcano
  2. NAME: volcano
  3. LAST DEPLOYED: Tue Jul 23 20:07:29 2019
  4. NAMESPACE: volcano-system
  5. STATUS: DEPLOYED
  6. RESOURCES:
  7. ==> v1/ClusterRole
  8. NAME AGE
  9. volcano-admission 1s
  10. volcano-controllers 1s
  11. volcano-scheduler 1s
  12. ==> v1/ClusterRoleBinding
  13. NAME AGE
  14. volcano-admission-role 1s
  15. volcano-controllers-role 1s
  16. volcano-scheduler-role 1s
  17. ==> v1/ConfigMap
  18. NAME DATA AGE
  19. volcano-scheduler-configmap 2 1s
  20. ==> v1/Deployment
  21. NAME READY UP-TO-DATE AVAILABLE AGE
  22. volcano-admission 0/1 1 0 1s
  23. volcano-controllers 0/1 1 0 1s
  24. volcano-scheduler 0/1 1 0 1s
  25. ==> v1/Job
  26. NAME COMPLETIONS DURATION AGE
  27. volcano-admission-init 0/1 1s 1s
  28. ==> v1/Pod(related)
  29. NAME READY STATUS RESTARTS AGE
  30. volcano-admission-b45b7b76-84jmw 0/1 ContainerCreating 0 1s
  31. volcano-admission-init-fw47j 0/1 ContainerCreating 0 1s
  32. volcano-controllers-5f66f8d76c-27584 0/1 ContainerCreating 0 1s
  33. volcano-scheduler-bb4467966-z642p 0/1 Pending 0 1s
  34. ==> v1/Service
  35. NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
  36. volcano-admission-service ClusterIP 10.107.128.208 <none> 443/TCP 1s
  37. ==> v1/ServiceAccount
  38. NAME SECRETS AGE
  39. volcano-admission 1 1s
  40. volcano-controllers 1 1s
  41. volcano-scheduler 1 1s
  42. ==> v1beta1/CustomResourceDefinition
  43. NAME AGE
  44. podgroups.scheduling.sigs.dev 1s
  45. queues.scheduling.sigs.dev 1s
  46. NOTES:
  47. Thank you for installing volcano.
  48. Your release is named volcano.
  49. For more information on volcano, visit:
  50. https://volcano.sh/
步骤 3:

验证 Volcano 各组件的运行状态。

  1. # kubectl get all -n volcano-system
  2. NAME READY STATUS RESTARTS AGE
  3. pod/volcano-admission-b45b7b76-84jmw 0/1 ContainerCreating 0 4m42s
  4. pod/volcano-admission-init-fw47j 0/1 ImagePullBackOff 0 4m42s
  5. pod/volcano-controllers-5f66f8d76c-27584 0/1 ImagePullBackOff 0 4m42s
  6. pod/volcano-scheduler-bb4467966-z642p 0/1 ImagePullBackOff 0 4m42s
  7. NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
  8. service/volcano-admission-service ClusterIP 10.107.128.208 <none> 443/TCP 4m42s
  9. NAME READY UP-TO-DATE AVAILABLE AGE
  10. deployment.apps/volcano-admission 0/1 1 0 4m42s
  11. deployment.apps/volcano-controllers 0/1 1 0 4m42s
  12. deployment.apps/volcano-scheduler 0/1 1 0 4m42s
  13. NAME DESIRED CURRENT READY AGE
  14. replicaset.apps/volcano-admission-b45b7b76 1 1 0 4m42s
  15. replicaset.apps/volcano-controllers-5f66f8d76c 1 1 0 4m42s
  16. replicaset.apps/volcano-scheduler-bb4467966 1 1 0 4m42s
  17. NAME COMPLETIONS DURATION AGE
  18. job.batch/volcano-admission-init 0/1 4m42s 4m42s

现在您已经完成了 Volcano 的全部安装,您可以运行如下的例子测试安装的正确性:样例