Azure Kubernetes -系统和用户池

thtygnil  于 2022-11-17  发布在  Kubernetes
关注(0)|答案(2)|浏览(107)

我在Azure AKS示例上配置了系统和用户池。我遵循此指南:
微软导向器
在活动之前,我们只有应用程序和系统单元的系统类型池。
我执行了以下步骤:

  • 创建系统类型池并设置以下污点“CriticalAddonsOnly = true:NoSchedule”(避免在系统池中部署应用程序微服务)
  • 将旧池从系统转换为用户
  • 重新启动以下部署:

网守系统:

  • 把关审计
  • 看门控制器

立方系统:

  • 核心
  • 磁心自动定标器
  • 度量服务器
  • 蓝色政策
  • azure策略网络挂钩
  • 连通性代理
  • 阿马洛克斯

以允许也在池系统上调度系统单元,因为它们在池创建之后不会自动调度。
现在,我注意到系统pod也已在池系统上进行了调度,但我在所有其他节点上看到相同的pod。即使我从用户池中粗暴地删除它们,它们也会立即重新部署到这些节点上。这种行为是否正确?从逻辑上讲,如果我有一个池系统,则所有pod都应仅位于该池中,而不应位于用户池中?
谢谢

1tuwyuhd

1tuwyuhd1#

根据Microsoft官方文档,这些是用户节点池和系统节点池的一些功能。
系统节点池:

Must be running Linux.
They can have a minimum of 1 node, but it is recommended to have 2 nodes or 3 if it is your only Linux node pool.
They only support AKS cluster running on Virtual Machine Scale Sets.
The nodes need at least 2 vCPUs and 4GB memory.
They need to support at least 30 pods.
Cannot be made up of Spot VM’s.
Can have multiple system node pools.
If only one system node pool, it cannot be deleted.
Can be changed to a user node pool if you have another system node pool.

用户节点池:

User node pools can be either Linux or Windows.
Can scale down to 0 nodes.
Can be deleted with no issues.
Spot VM’s can be used
Can be changed to a system node pool.
Can have as many user node pols as Azure will let you.

根据pod定义,除非由DaemonSet控制,否则系统pod必须在系统节点池上调度。如果系统pod由DaemonSet控制,则必须在群集中存在的每个节点上调度,而不管池类型如何。我的群集有4个节点。2个系统,2个用户。因此,存在于kube-system命名空间中的这些系统pod具有每个节点的副本。

kubectl get ds -n kube-system
NAME                       DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
ama-logs                   4         4         4       4            4           <none>          14d
azure-cni-networkmonitor   4         4         4       4            4           <none>          540d
azure-ip-masq-agent        4         4         4       4            4           <none>          540d
kube-proxy                 4         4         4       4            4           <none>          540d

进一步控制应用程序单元的行为,使其不在系统池中调度。您可以通过此操作在系统节点池中添加tain,所有应用程序单元将仅在用户节点池中调度。

az aks nodepool add \
    --resource-group myResourceGroup \
    --cluster-name myAKSCluster \
    --name systempool \
    --node-count 3 \
    --node-taints CriticalAddonsOnly=true:NoSchedule \
    --mode System
m3eecexj

m3eecexj2#

AKS在调度系统pod时首选系统节点池,但当系统节点池没有足够的容量来调度所有系统pod时,不能保证系统pod不会被放在用户节点池中。
您是否已检查系统池是否具有所有系统单元所需的容量?
请参阅您提到的页面的限制部分。

相关问题