Closed Tranquility closed 3 years ago
Maybe I should have selected the support issue template. Feel free to change it.
@Tranquility I managed to reproduce the issue. Also, I found out that in case .spec.replicas
is lower than min-size
, the MachineDeployment will never be autoscaled, even if there are Pending pods due to insufficient memory or any other reason.
It seems like setting .spec.replicas
to the same value as the min-size
annotation (e.g. 6 in your case) mitigates the issue. I'm not sure is this expected or not, so I have to investigate a bit more. I'll keep this issue updated with findings.
Setting replies < minimum replicas is kinda useless. Apparently this logic breaks cluster-autoscaler.
Closing this as it's not up to Kubeone to manage or validate this.
What happened: Cluster-autoscaler logs
node group min size reached
instead of scaling up the worker nodes.What is the expected behavior: New nodes should have been created.
How to reproduce the issue:
MachineDeployment
```yaml apiVersion: cluster.k8s.io/v1alpha1 kind: MachineDeployment metadata: annotations: cluster.k8s.io/cluster-api-autoscaler-node-group-min-size: "6" cluster.k8s.io/cluster-api-autoscaler-node-group-max-size: "20" finalizers: - foregroundDeletion generation: 1 name: {{ env "CLUSTER_NAME" }}-pool2 namespace: kube-system spec: minReadySeconds: 0 progressDeadlineSeconds: 600 replicas: 1 revisionHistoryLimit: 1 selector: matchLabels: workerset: {{ env "CLUSTER_NAME" }}-pool2 strategy: rollingUpdate: maxSurge: 1 maxUnavailable: 0 type: RollingUpdate template: metadata: creationTimestamp: null labels: workerset: {{ env "CLUSTER_NAME" }}-pool2 namespace: kube-system spec: metadata: creationTimestamp: null labels: workerset: {{ env "CLUSTER_NAME" }}-pool2 providerSpec: value: cloudProvider: hetzner cloudProviderSpec: image: ubuntu-20.04 labels: {{ env "CLUSTER_NAME" }}-workers: pool2 location: nbg1 networks: - {{ .Config.CloudProvider.Hetzner.NetworkID }} serverType: ccx12 operatingSystem: ubuntu operatingSystemSpec: distUpgradeOnBoot: false sshPublicKeys: - {{ env "HCLOUD_SSH_PUBLIC_KEY" }} versions: kubelet: {{ .Config.Versions.Kubernetes }} ```I installed a new machine deployment because I couldn't get the annotations applied via the terraform integration (I even ran
kubeone upgrade
).The logs show that the min size is 6, and it only finds 1 node but still says the min number is reached. Here is the relevant log output:
Anything else we need to know? I am using the hetzner cloud provider. And I updated the resources to match according to this PR https://github.com/kubernetes/autoscaler/pull/4020/files
Information about the environment: KubeOne version (
kubeone version
): master Operating system: Provider you're deploying cluster on: hetzner Operating system you're deploying on: ubuntu-20.04