Hosting workload on the right node in Kubernetes

Naresh Waswani
8 min readJan 31, 2023
Image Credit — https://unsplash.com/photos/KU9ABpm7eV8

Are you running Kubernetes as a Platform for the Application teams to run their services? If yes, then very soon you will have some of the typical requests coming from the Teams saying —

  1. Our service is compute heavy and we want to get the service pods hosted on a Compute heavy node and not a generic one.
  2. Pods of these two specific services should always be running on the same node.
  3. This is an AI/ML specific service and it should always be running on a GPU based node.
  4. My service can run on any node provided the node has SSD type storage.
  5. And this list literally can just go on, and on, and on.

Or, maybe as a Platform team, you might collaborate with the Application teams to identify stateless workload and if it can be run on Spot instances, may be on lower environments if not in production. This helps you to implement the Cost saving strategy from Day 0. I know it sounds premature optimisation, but if properly planned, can be done right in the 1st attempt.

Well, if you are in this situation, nothing to panic as Kubernetes has Out of box features which can help you implement the above ask in a very clean way. These features in Kubernetes are known as —

  1. Node selector or Node Affinity &

--

--

Naresh Waswani
Naresh Waswani

Written by Naresh Waswani

#AWS #CloudArchitect #CloudMigration #Microservices #Mobility #IoT

No responses yet