我正在尝试将自适应 dask kubernetes 集群部署到我的 aws K8s 实例(我想使用此处找到的 kubeControl 接口)。我不清楚我在哪里以及如何执行此代码以使其在我现有的集群上处于活动状态。除此之外,我还想要一个入口规则,以便我拥有的另一个 ec2 实例可以连接到集群并在 aws VPC 中执行代码,以维护安全性和网络性能。
到目前为止,我已经设法获得了一个运行 dask 和 jupyterhub 的功能性 k8s 集群。我正在使用此处找到的示例舵图,它在此处引用docker 图像。我可以看到这个图像甚至没有安装 dask-kubernetes。话虽如此,我可以使用暴露的 AWS dns 服务器从我的其他 ec2 实例连接到该集群并执行自定义代码,但这不是 kubernetes 原生 dask 集群。
我一直致力于为 kubernetes 修改部署 yaml,但我不清楚我需要更改什么才能让它使用正确的 kubernetes 集群/调度程序。我确实知道我需要修改我在安装 dask-kubernetes 时使用的 docker 映像,但这仍然对我没有帮助。下面是我正在使用的示例 helm 部署图表
---
# nameOverride: dask
# fullnameOverride: dask
scheduler:
name: scheduler
image:
repository: "daskdev/dask"
tag: 2.3.0
pullPolicy: IfNotPresent
# See https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
pullSecrets:
# - name: regcred
replicas: 1
# serviceType: "ClusterIP"
# serviceType: "NodePort"
serviceType: "LoadBalancer"
servicePort: 8786
resources: {}
# limits:
# cpu: 1.8
# memory: 6G
# requests:
# cpu: 1.8
# memory: 6G
tolerations: []
nodeSelector: {}
affinity: {}
webUI:
name: webui
servicePort: 80
worker:
name: worker
image:
repository: "daskdev/dask"
tag: 2.3.0
pullPolicy: IfNotPresent
# dask_worker: "dask-cuda-worker"
dask_worker: "dask-worker"
pullSecrets:
# - name: regcred
replicas: 3
aptPackages: >-
default_resources: # overwritten by resource limits if they exist
cpu: 1
memory: "4GiB"
env:
# - name: EXTRA_CONDA_PACKAGES
# value: numba xarray -c conda-forge
# - name: EXTRA_PIP_PACKAGES
# value: s3fs dask-ml --upgrade
resources: {}
# limits:
# cpu: 1
# memory: 3G
# nvidia.com/gpu: 1
# requests:
# cpu: 1
# memory: 3G
# nvidia.com/gpu: 1
tolerations: []
nodeSelector: {}
affinity: {}
jupyter:
name: jupyter
enabled: true
image:
repository: "daskdev/dask-notebook"
tag: 2.3.0
pullPolicy: IfNotPresent
pullSecrets:
# - name: regcred
replicas: 1
# serviceType: "ClusterIP"
# serviceType: "NodePort"
serviceType: "LoadBalancer"
servicePort: 80
# This hash corresponds to the password 'dask'
password: 'sha1:aae8550c0a44:9507d45e087d5ee481a5ce9f4f16f37a0867318c'
env:
# - name: EXTRA_CONDA_PACKAGES
# value: "numba xarray -c conda-forge"
# - name: EXTRA_PIP_PACKAGES
# value: "s3fs dask-ml --upgrade"
resources: {}
# limits:
# cpu: 2
# memory: 6G
# requests:
# cpu: 2
# memory: 6G
tolerations: []
nodeSelector: {}
affinity: {}