How to deploy different modules on different node pools and make "Load Balancer" to specific node pool?


My project has 3 modules: WEB, API and ServerSockets. I must create a cluster with 3 kubernetes node pools and deploy each module to a node pool.

  1. How to deploy to each node pool?
  2. How to make requests/connections for each module forward to the correct node pool?

Who knows and can help me will be of great help!

And if you have any architectural suggestions, you will also be welcome.



Great, jkwiatkoski!

I’ll consider your comment :)


Just a few clarifying questions:

Regarding question 1:

Do your modules need to live on separate nodepools? This can actually restrict a lot of your HA benefits of kubernetes if you have nodes specific to certain nodepools. If its a matter of resource usage you could alternatively combine the resources you would use and allow them all to share nodes with sufficient capacity.

Regarding question 2:

Using the LB integrations DO has out of the box you can set your kubernetes service’s ‘externalTrafficPolicy: Local’. This will result in only nodes hosting the service’s pods to show as healthy. Otherwise you could also distribute traffic by exposing a ingress controller service such as nginx.

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Thank you, Conrad!

Hi, you can add a nodeSelector to a Deployment resource:

One can also use Taints and Tolerations and more information can be found in the docs:

Good luck and all the best.