-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No ScaleUp action for a new Pod and existing PVC/PV (AWS EKS, EBS Volume) #4739
Comments
@KashifSaadat , I see a similar issue on my clusters as well. In my case, I see PVs getting provisioined with the new topology keys on a k8s 1.21 cluster of
However, the function in aws_manager in CA still uses the old labels when building nodes from ASGs that are of zero size. These labels are
You can see the labels getting applied for the hypothetical node here:
In my case, I see the error message "node(s) had volume node affinity conflict" b/c the labels don't match. |
when nodes are created in EKS, they get both the old, and new, topology labels. It's just the CA that still only uses the old when building a hypothetical node. Should be an easy fix. Can you confirm this is what is happening to your cluster? |
aws_manager.go is updated to use the new topology labels in the 1.22 and 1.23 tags of CA, but not in 1.21.x. This commit would fix our issue |
Hey @mmerrill3, nice find thank you!! I increased log verbosity to see the reference to the deprecated labels and confirmed the discrepancy as you've described. Tried this out with cluster-autoscaler v1.22.2 and it did manage to scale up successfully! I ran into another issue validating this on my test cluster. I had a single ASG spanned across 3 Availability Zones and so when it scales up, the new Node happened to be in a different AZ to where the volume was. The Pod could not be scheduled on this Node and so it remained empty until a ScaleDown event, and no further ScaleUp actions were performed. This is mentioned as a gotcha in the AWS specific docs already, with the recommended approach being to have an ASG per AZ. Edit: I'll close this issue as it appears to be correctly resolved from cluster-autoscaler v1.22.0 onwards and there isn't any further work required as far as I'm aware. |
@KashifSaadat you mentioned you are using k8s 1.21.5. At the maintainers: would this be something that could be backported ? |
Hey @Xyaren. I haven't noticed any issues myself, but generally prefer to run the component version in line with my cluster version. |
Looks like there is new label for gp3
|
Same for this, the pv of ebs contains the following nodeSelectorTerms
|
Which component are you using?: cluster-autoscaler, helm chart
What version of the component are you using?: k8s.gcr.io/autoscaling/cluster-autoscaler:v1.20.0, cluster-autoscaler-chart-9.9.2
What k8s version are you using (
kubectl version
)?: v1.21.5-eks-bc4871bkubectl version
OutputWhat environment is this in?: Amazon Elastic Kubernetes Service (EKS)
What did you expect to happen?:
I created a PersistentVolumeClaim using a default gp2 StorageClass (EBS volume), and then a simple Deployment referencing the PVC. The Volume is created successfully and Pod schedules (cluster-autoscaler brings up a new Node to meet demand). I then scaled down the Deployment to 0, causing the cluster-autoscaler to drop 1 Node as it was no longer needed. On scaling the Deployment back to 1 replica (whilst the current Nodepool is at max capacity), the cluster-autoscaler should have detected and scaled the Nodepool, so the Pod can get scheduled on a Node successfully and attach the PV.
What happened instead?:
The Pod is stuck in a Pending state.
kubectl get events
Outputkubectl logs -lapp.kubernetes.io/name=aws-cluster-autoscaler
OutputHow to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
I first thought this could be related to our EKS Cluster configuration, Nodepool configuration (tags are all there), cluster-autoscaler args (defaults, all standard) etc. However, I can just scale the Nodepool manually by 1 instance (or create another workload causing a new Node to be created), and this finally allows the Pod to be scheduled to a Node where the EBS volume can be attached and used.
Edit: I've also tested this with the latest
cluster-autoscaler
release for Kubernetes v1.21 (v1.21.1) and get the same issue.The text was updated successfully, but these errors were encountered: