Control the creation of pods on a specific node in azure AKS

I used the helm chart to deploy timescaleDB on Azure AKS, where I created 5 nodes and deployed timescaleDB. Following deployment, I noticed,

  • Both data-node-2 and access-node-0 were deployed on the same NODE ( aks-agentpool-17831602-vmss000003).

  • Data-node-1 and data-node-2 are deployed on separate NODES ( aks-agentpool-17831602-vmss000001 and aks-agentpool-17831602-vmss000002).

  • Despite the fact that Nodes (aks-agentpool-17831602-vmss000004 and aks-agentpool-17831602-vmss000005) were ready, data-node-2 was deployed on the same node as access-node.


How can we control the creation of pods on a specific node?
Is it possible to specify the creation of that access node or data node that should get created in a specific NODE.

Hi @Mohammed_Iliyas_pate

Haven’t been able to find you examples or code that covers this, but I’m wondering if this might work as a step-off point for you (in answer to a different but similar question). I know that you’ve found your own solutions before so I thought it might help inspire something :nerd_face:

Scheduling a pod to a specific node is possible using taints mechanism in Kubernetes. If a user wants to prevent workloads from being scheduled to the same node for HA purposes, it’s also possible to use topology spread constraints.

1 Like

Hey @Mohammed_Iliyas_pate!

I’d recommend to change the template of the helm chart and configure different taints to pin pods to a specific node or set of nodes. That’s what we did in the past to prevent other services from running on the timescale nodes and timescale instances being started on other nodes. The same way you can use two different taints to have one node specific to the access node and the others for data nodes. I hope that makes sense.