-
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
AWS - CA does not tolerate balance-similar-node-groups when ASG min and desired capacity is 0 #2503
Comments
/area provider/aws |
What expander do you have configured? |
@joekohlsdorf least-waste |
We had the same problem, changing the expander to |
/assign @Jeffwan |
@joekohlsdorf Cheers for that, we were facing the same issue and setting it to |
I've just run into this with our clusters. Even with the |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Hello, any updates on it? |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
/unassign @Jeffwan |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
/remove-lifecycle stale |
It seems like a fundamental bug with CA, the templated node infos never match the actual node infos as far as I can tell. #1676 (comment) describes all the reasons why. To me, it seems the main problem is capacity/allocatable fields. I think this could be fixed by ignoring capacity fields that don't exist when comparing two node groups. |
^ More than that, the actual memory capacities are way off the templates for the AWS provider. I see there was a PR to tolerate up to 1.5%, but in my testing the variance can be much greater. For instance, spawning an m5.4xlarge in eu-west-1 with amazon linux 2 gives 62Gi of memory - 2Gi off of what the template value provides, which is more than 1.5% (~3%). For an m5.large, I saw around a 6% divergence. So the toleration needs to be much larger than it is currently, in addition to my prior suggestion to ignore mismatched capacity/allocatable fields. |
Seeing this issue as well. I've dug into the logic that determines if a node group is "similar" and am experiencing what @jsravn is seeing - it ignores a node group due to the node's memory being off the template's memory. |
@jsravn @awprice You both seem to be describing a different issue than the one originally described in this GH issue. The original issue is about spreading nodes properly across ASGs having similar sizing. The solution to the original issue was to use the However, @jsravn and @awprice, you seem to be describing a different problem altogether, which is that the calculation of allocatable resources for a Kubernetes Node (which takes into account the amount of memory reserved for the kubelet on the EC2 worker node instance) is different from the Cluster Autoscaler's You will note this in the aws_manager.go file: autoscaler/cluster-autoscaler/cloudprovider/aws/aws_manager.go Lines 349 to 350 in c4b56ea
So it's clear that someone, sometime in the past, realized that this allocatable versus capacity calculation was going to be problematic... @jsravn @awprice if I have correctly summarized your issue (and how it's different from the original poster's issue), would you mind creating a new GH issue describing your specific problem and we'll track it separately. I'm thinking we should close this particular issue out because the solution to the original problem is to use the |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
Seriously, for everyone who uses K8S autoscaler in AWS - try Karpenter (https://karpenter.sh/) |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There are 3 autoscaling groups tagged with
k8s.io/cluster-autoscaler/SandboxEksCluster
andk8s.io/cluster-autoscaler/enabled
.SandboxEksCluster
is my the name of my cluster.Autoscaler is started up with the balance flag
I1031 08:41:01.352107 1 flags.go:52] FLAG: --balance-similar-node-groups="true"
I am operating on simple nginx deployment
kubectl run nginx --image=nginx --replicas=10
and scaling it accordingly so that new worker nodes should be added
kubectl scale deployment/nginx --replicas xx
Each time CA picks a node from the most loaded ASG
the same happens two times more until ASG reaches its maximum size of 5
I resized the deployment once again and this time CA picked a node from remaining ASGs as the previous is already full
Repeating the scenario from the beginning with all 3 ASG having min set to 1
Please note the log entry:
I1031 10:23:12.754185 1 scale_up.go:521] Splitting scale-up between 3 similar node groups: {sandbox-eks-cluster-SandboxEksClusterEksClusterAsgUsEast1BASG4E9ED460-PGHSCBA70FJW, sandbox-eks-cluster-SandboxEksClusterEksClusterAsgUsEast1AASGA5AFF92F-1RZHULCJIW9D0, sandbox-eks-cluster-SandboxEksClusterEksClusterAsgUsEast1CASG93B5A949-1V77ZIQFJJY7K}
which could indicate CA really respects
--balance-similar-node-groups
property.The text was updated successfully, but these errors were encountered: