Cluster Auto Scaler with resources req & lim

4/29/2021

This is the first time I deployed Cluster Autoscaler (CA) on EKS.

The CA configuration file contains Limits & Requests:

     Limits:                                           
cpu:     100m                                                                                         
memory:  300Mi                                                                                                                
Requests:                                                                                                                       
cpu:     100m                                                                                                                 
memory:  300Mi

My questions are the following:

  1. Does the Limits & Requests fields in the CA refers to the CA pod only?
  2. If I deploy a pod (for example nginx) and I deploy it without specifying resources requests & limits in the pod's configuration, will the CA know how much resources nginx needs and allocate the proper amount?

-- jrz
amazon-eks
amazon-web-services
autoscaling
kubernetes

1 Answer

4/29/2021

Documentation is your friend:

  1. The limits and requests fields in the Cluster Autoscaler (which will basically be a Deployment on k8s) definition will be valid for each pod that will be spawned with this definition, unless the pods themselves have limits and requests defined.
  2. Which brings us to your second question: if a pod is spawned based on a config file without limits & resources, the defaults will be those specified for the master node.

    1: https://docs.aws.amazon.com/eks/latest/userguide/cluster-autoscaler.html

-- Rigerta
Source: StackOverflow