【问题标题】:az aks nodepool deleteaz aks 节点池删除
【发布时间】:2020-04-30 08:45:49
【问题描述】:

我使用命令az aks nodepool delete -g $myresource --cluster-name $mycluster --name $mypool 删除aks 中的节点池,但是该命令会终止所有正在运行的作业。我正在尝试优化 azure AKS 婴儿床,有时安排 az aks nodepool delete 会很有用。

有没有办法安排az aks nodepool delete,以便在作业完成后删除节点池?

【问题讨论】:

  • 最好是缩小节点池而不是删除整个组
  • @AmitBaranes 资源组 $myresource 有两个节点池,一个是 az aks 必须的,一个是我需要在 GPU 上运行时创建的。因此,通过使用我的问题中的命令,我只删除了带有 GPU 的节点池,而不是整个组
  • 你如何确定这个命令会杀死任何正在运行的作业? (只是想收集更多信息)
  • 阅读文档我看到有一个可选参数--no-wait,因此我认为如果我没有在az aks nodepool delete中传递该参数,那么节点池将在作业完成后被删除.所以,我测试了它。我在运行作业时写了删除命令,没有--no-wait,作业被杀死了。
  • 您运行的是哪个版本的 azure cli?

标签: azure azure-aks


【解决方案1】:

我了解到您正在尝试删除正在为 GPU 创建虚拟机的 NodePool。

请注意,虽然删除 AgentPool 可能是一个可行的解决方案,但您应该查看 AKS 新发布的功能,该功能允许将用户模式 ​​NodePool 缩减到 0。

https://docs.microsoft.com/en-us/azure/aks/use-system-pools

使用此版本的 AKS:https://github.com/Azure/AKS/releases/tag/2020-04-13

Features
AKS has now introduced a new Mode property for nodepools. This will allow you to set nodepools as System or User nodepools. System nodepools will have additional validations and will be preferred by system pods, while User pool will have more lax validations and can perform additional operations like scale to 0 nodes or be removed from the cluster. Each cluster needs at least one system pool. All details here: https://aka.ms/aks/nodepool/mode
System/User nodepools are available from core CLI version 2.3.1 or greater (or latest preview extension 0.4.43)

Nodepool mode requires API 2020-03-01 or greater

AKS now allows User nodepools to scale to 0.

这将允许您为 GPU 保留 VMSS,为节点池启用 AutoScaler 并将最小节点数设置为 0。

您的 GPU 节点将在需要时创建(需要 GPU 节点的 pod,应触发自动缩放器)

【讨论】:

  • 运行az aks upgrade 与您当前拥有的相同版本号。
  • 你的意思是像这样az aks upgrade --resource-group mygroup --name myname -k 1.14.8 吗?我首先收到此消息The cluster is already on version 1.14.8 and is not in a failed state. No operations will occur when upgrading to the same version if the cluster is not in a failed state. Since control-plane-only argument is not specified, this will upgrade the control plane AND all nodepools to version 1.14.8. Continue?,然后收到一条错误消息,提示我没有正确的权限
  • 是的,没错。查看 AKS-Engine 的版本,它写在 AKS 创建的 VMSS 标签上。
猜你喜欢
  • 2021-12-17
  • 2022-01-24
  • 2022-11-21
  • 2020-02-06
  • 1970-01-01
  • 2022-09-23
  • 2020-12-01
  • 2021-09-19
  • 2022-01-05
相关资源
最近更新 更多