Repository navigation
Description
Which component are you using?: Cluster Autoscaler with Cluster API
What version of the component are you using?: 1.21.0
What k8s version are you using (kubectl version)?: 1.21.3
kubectl version Output
$ kubectl version
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.3", GitCommit:"ca643a4d1f7bfe34773c74f79527be4afd95bf39", GitTreeState:"clean", BuildDate:"2021-07-15T20:59:07Z", GoVersion:"go1.16.6", Compiler:"gc", Platform:"linux/amd64"}
What environment is this in?: OpenStack
What did you expect to happen?:
When the number of nodes is under the minimum size and I have unschedulable pods, new nodes are created.
What happened instead?:
No new nodes were created, pods stay in Pending.
scale_up.go:472] Estimated 2 nodes needed in MachineDeployment/kube-system/diligent-worker
scale_up.go:586] Final scale-up plan: [{MachineDeployment/kube-system/diligent-worker 2->4 (max: 10)}]
static_autoscaler.go:427] Failed to scale up: failed to increase node group size: size decrease too large - desired:4 min:6size decrease too large - desired:4 min:6
The following code prevents a scale up from happening:
case nreplicas < r.minSize:
return fmt.Errorf("size decrease too large - desired:%d min:%d", nreplicas, r.minSize)
}
How to reproduce it (as minimally and precisely as possible):
Create a cluster with 2 nodes. Set the min size to something higher. In my example min size to 4, max size to 10.
Create pods that would trigger a scale up by 1 or 2 nodes.
The replicas are smaller than the min size, no scale up happens.
Anything else we need to know?:
Activity
squ94wk commentedon Jun 3, 2022
By the same logic (
SetSize()), scale downs are currently probably prevented if current - diff > max.k8s-triage-robot commentedon Sep 15, 2022
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:
lifecycle/staleis appliedlifecycle/stalewas applied,lifecycle/rottenis appliedlifecycle/rottenwas applied, the issue is closedYou can:
/remove-lifecycle stale/lifecycle rotten/closePlease send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
k8s-triage-robot commentedon Oct 15, 2022
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:
lifecycle/staleis appliedlifecycle/stalewas applied,lifecycle/rottenis appliedlifecycle/rottenwas applied, the issue is closedYou can:
/remove-lifecycle rotten/closePlease send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
fix(kubernetes, e2e): unblock autoscaling below min size, size the co…