简体   繁体   English

Azure Kubernetes 服务:如何设置整个节点池的污点?

[英]Azure Kubernetes Service: How to setup taint to whole node pool?

I have one node pool named " application pool " which contains node vm size of Standard_D2a_v4 .我有一个名为“应用程序池”的节点池,其中包含Standard_D2a_v4的节点虚拟机大小。 This node pool is set to " Autoscaling ".此节点池设置为“自动缩放”。 Is there in solution, where I taint the whole node pool in azure?是否有解决方案,我污染了 azure 中的整个节点池? to restrict the pods to schedule on that node pool?限制 pod 在该节点池上调度?

Taints can be setup with the [--node-taints] flag only when you are adding a node pool with az aks nodepool add command:仅当您使用az aks nodepool add命令添加节点池时,才可以使用[--node-taints]标志设置污点:

Add a node pool to the managed Kubernetes cluster.将节点池添加到托管 Kubernetes 集群。

az aks nodepool add --cluster-name
                    --name
                    --resource-group
                    [--node-taints]

However, you cannot add taints to already existing node pool :但是,您不能将污点添加到已经存在的节点池中

You can't change the node taints through CLI after the node pool is created.创建节点池后,您无法通过 CLI 更改节点污点。

A very similar topic is being discussed in this open thread .这个开放线程正在讨论一个非常相似的主题。

So currently it is not possible to set taints to an existing node pool on AKS.因此,目前无法对 AKS 上的现有节点池设置污点。 But you can set them up while adding a new node pool to the managed cluster.但是您可以在将新节点池添加到托管集群时进行设置。

If you provisioned your cluster with Terraform, you can specify node_taints in azurerm_kubernetes_cluster_node_pool see here However, you can't add taints to default node pool如果您使用 Terraform 预配集群,则可以在azurerm_kubernetes_cluster_node_pool中指定node_taints请参见此处但是,您不能将污点添加到默认节点池

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM