我最近在我们的K8s集群中托管了Jupyterhub。我们将内存限制设置为1 1GB,所以现在所有的Jupyter笔记本都使用这种配置。但是我们的笔记本电脑是资源(内存和cpu)密集型的,而有些笔记本电脑不是资源密集型的
那么,有没有办法为多个jupyter pod分配不同的资源呢?
我正在使用helm chart部署jupyterhub https://zero-to-jupyterhub.readthedocs.io/en/latest/jupyterhub/installation.html
发布于 2021-12-04 18:48:37
我们使用profiles允许用户从不同大小的pods中进行选择。pod都部署在较大的节点上,但用户可以选择获取半个节点的pod还是全节点的pod。
作为示例,我们在daskhub配置的基础上构建(全规格here):
daskhub:
jupyterhub:
singleuser:
image:
cpu:
limit: 3.5
guarantee: 3.5
memory:
limit: 22.5G
guarantee: 22.5G
profileList:
- display_name: "default"
description: "Default notebook size"
default: true
- display_name: "large"
description: "Larger notebook allowance"
kubespawner_override:
cpu_limit: 7.0
cpu_guarantee: 7.0
mem_limit: 45G
mem_guarantee: 45G这两个都是在8CPU /52 go节点上产生的,但两个较小的pod将在同一个节点上(假设2个用户选择“默认”)。
发布于 2021-12-04 13:47:24
如果您的PODs由Deployment或Stateful set管理,则没有其他选择。
或者为具有不同配置的多个Jupiter笔记本电脑创建不同的不同部署,或者将每个笔记本电脑部署为具有资源需求的不同。
我建议使用VPA,它将自动扩展您的部署或有状态设置,并根据需要调整资源要求。
查看有关VPA的更多信息:https://cloud.google.com/kubernetes-engine/docs/concepts/verticalpodautoscaler
https://stackoverflow.com/questions/70223911
复制相似问题