Search code examples
kubernetesgoogle-kubernetes-engineamazon-eksazure-akskubernetes-pod

Why there is no concept of nodepool in Kubernetes?


I can see GKE, AKS, EKS all are having nodepool concepts inbuilt but Kubernetes itself doesn't provide that support. What could be the reason behind this?

We usually need different Node types for different requirements such as below-

Some pods require either CPU or Memory intensive and optimized nodes. Some pods are processing ML/AI algorithms and need GPU-enabled nodes. These GPU-enabled nodes should be used only by certain pods as they are expensive. Some pods/jobs want to leverage spot/preemptible nodes to reduce the cost.

Is there any specific reason behind Kubernetes not having inbuilt such support?


Solution

  • As Blender Fox mentioned Node group is more specific to Cloud provider Grouping/Target options.

    In AWS we have Node groups or Target groups, While in GKE Managed/Unmanaged node groups.

    You set the Cluster Autoscaler and it scales up & down the count in the Node pool or Node groups.

    If you are running Kubernetes on On-prem there may not be the option of a Node pool, as the Node group is mostly a group of VM in the Cloud. While on the on-prem bare metal machines also work as Worker Nodes.

    To scale up & Down there is Cluster autoscaler(CA adds or removes nodes from the cluster by creating/deleting VMs) in K8s which uses the Cloud provider node group API while on Bare metal it may not work simply.

    Each provider have own implementation and logic which get determined from K8s side by flag --cloud-provider Code link

    So if you are on On-prem private cloud write your own cloud client and interface.

    It's not necessary to have to node group however it's more of Cloud provider side implementation.

    For Scenario

    Some pods require either CPU or Memory intensive and optimized nodes. Some pods are processing ML/AI algorithms and need GPU-enabled nodes. These GPU-enabled nodes should be used only by certain pods as they are expensive. Some pods/jobs want to leverage spot/preemptible nodes to reduce the cost.

    You can use the Taints-toleration, Affinity, or Node selectors as per need to schedule the POD on the specific type of Nodes.