I configured system and user pool on Azure AKS instances. I follow this guide:
before the activity we only had system type pools for applications and system pods as well.
I did the following steps:
-
creation of a system type pool and set of the following taint "CriticalAddonsOnly = true: NoSchedule" (to avoid deployment on the system pool for application microservices)
-
conversion of old pools from system to users
-
restart the following deployments:
gatekeeper-system:
- gatekeeper-audit
- gatekeeper-controller
kube-system:
- coredns
- coredns-autoscaler
- metrics-server
- azure-policy
- azure-policy-webhook
- konnectivity-agent
- ama-logs-rs
to allow the scheduling of system pods also on the pool system since they are not automatically scheduled after pool creation.
Now i’m noticing that the system pods have now been scheduled on the pool system as well but I keep seeing the same pods on all other nodes. Even if I brutally delete them from the user pools, they are immediately redeployed on them. Is the behavior correct? Logically if I have a pool system all pods should only be on that pool and none on the user pool?
Thanks
2
Answers
AKS prefer system nodepool when scheduling system pods, but it’s not guaranteed that system pods won’t be put on a user nodepool when system nodepool does not have enough capacity to schedule all system pods.
Have you checked if your system pool has the required capacity for all system pods?
see the limitaions section of the page you mentioned.
As per Microsoft official documentation, these are the some features of user node pool and system node pool.
System Node Pool:
User Node Pool:
As per pod definitions, system pods are bound to be scheduled on system node pool unless controlled by DaemonSet. If a system pod is controlled by DaemonSet, it is bound to be scheduled to on every node present in a cluster regardless of pool type. My cluster has 4 nodes. 2 systems, 2 user. So these system pods exist in kube-system namespace have replicas each for one node.
To further controll the behaviour of application pod to be not scheduled on system pool. You can add tain on System node pool by this and all application pods will be only scheduled on user node pool.