I am using EKS with node group for K8S.
The desired node is 1 and the maximum is 3.
Currently, there is only one ec2 (t3.xlarge) is running.
When I deploy two pods in one namespace, each requests 8G memory and 2 CPU, the first one is deployed successfully but the second one failed with the error 1 Insufficient cpu, 1 Insufficient memory
.
I expect EKS should scale up one more node to allocate this new pod but it doesn't.
Does anyone know why the auto-scale doesn't happen?
What am I understand wrong?
With Amazon EKS you need to follow those rules prior to use AutoScaler
https://docs.aws.amazon.com/eks/latest/userguide/cluster-autoscaler.html
I have highlighted what might be your problem
Before deploying the Cluster Autoscaler, you must meet the following prerequisites:
Have an existing Amazon EKS cluster – If you don’t have a cluster, see Creating an Amazon EKS cluster.
An existing IAM OIDC provider for your cluster. To determine whether you have one or need to create one, see Create an IAM OIDC provider for your cluster.
Node groups with Auto Scaling groups tags – The Cluster Autoscaler requires the following tags on your Auto Scaling groups so that they can be auto-discovered.
If you used eksctl to create your node groups, these tags are automatically applied.
If you didn't use eksctl, you must manually tag your Auto Scaling groups with the following tags.
Key | Value |
---|---|
k8s.io/cluster-autoscaler/\<cluster-name> | owned |
k8s.io/cluster-autoscaler/enabled | TRUE |