Cluster Autoscaler is enabled, but no new nodes are added
New nodes are not added and the pods remain in the Pending state, even though Cluster Autoscaler is enabled.
There might be several possible reasons for this issue. Follow the instructions below one by one until the issue is resolved.
-
Connect to the cluster via
kubectl. -
Display the manifest of the affected pod using the command:
kubectl describe pod <POD_NAME> -
If the manifest does not have the
resources.requestsblock, add it and specify the required resources (CPU and memory). Manifest example:apiVersion: v1kind: Podmetadata:name: frontendspec:containers:- name: appimage: images.my-company.example/app:v4resources:requests:memory: "64Mi"cpu: "250m"limits:memory: "128Mi"cpu: "500m"- name: log-aggregatorimage: images.my-company.example/log-aggregator:v6resources:requests:memory: "64Mi"cpu: "250m"limits:memory: "128Mi"cpu: "500m"
For more details on resources, refer to the Resource limiting section and the official Kubernetes documentation.
-
View the number of nodes in the node group.
Management consolekubectl- Go to your VK Cloud management console.
- Select the project where the required cluster is located.
- Go to Kubernetes Clusters → Kubernetes Clusters.
- Go to the required cluster and locate the affected node group.
- Click
for the node group, select Scaling settings, and activate the Enable autoscaling option.
- In the window that opens, compare the values of the Maximum number of nodes and Number of nodes parameters. If they are equal, the node group already has the maximum number of nodes.
- Connect to the cluster via
kubectl. - Check whether the Cluster Autoscaler logs have warnings that contain
max size reached. If they do, the node group already has the maximum number of nodes.
-
Increase the maximum number of nodes as required.
For more details, refer to the Managing worker node group section.
-
View the quotas for vCPUs, RAM, and virtual machines in your VK Cloud project.
Management consolekubectl-
Go to your VK Cloud management console.
-
Click the username in the header of the management console and select Quotas management from the drop-down list. The quotas page opens.
The same page is available if you select Project settings and go to the Quotas tab.
-
Click
to the right of the required quota. This opens a window with the information on the quota: specifically, on which objects and in which services it is spent.
- Connect to the cluster via
kubectl. - Check whether the Cluster Autoscaler logs have warnings that contain
quota exceeded. If they do, the project is out of quotas for the respective resources.
-
-
If there are no more quotas available, and the project needs additional ones, select one of the approaches:
- Delete unused resources to free up quotas.
- Increase quotas for your project.
For more details on quotas, refer to the Quotas and limits section.
-
Connect to the cluster via
kubectl. -
Check whether the Cluster Autoscaler logs have warnings that contain
predicate failed. If they do, the issue is due to the scheduling policies applied to the cluster. -
Display the manifest of the affected pod using the command:
kubectl describe pod <POD_NAME> -
In the manifest, review the scheduling policies. They can be set by
nodeSelector,affinity, ortolerations. If the existing or potential new nodes do not meet the requirements of the existing scheduling policies, select one of the approaches:- Coordinate the pod settings with the specified policies.
- Add a new node group that matches the specified policies.
For more details on labels, taints, and tolerations, refer to the Labels and taints section.
-
Connect to the cluster via
kubectl. -
Display the manifest of the affected pod using the command:
kubectl describe pod <POD_NAME> -
Check whether the Cluster Autoscaler logs have warnings that contain
volume node affinity conflict. If they do, the pod is bound to a persistent volume in a different availability zone and cannot be scheduled on the node where the volume is available. -
Change the value of the
volumeBindingModeparameter in the storage class manifest of your cluster forWaitForFirstConsumer. With this parameter, Kubernetes waits for the first pod to be scheduled, and then binds the volume to a specific node. -
Apply the changes in the storage class manifest:
kubectl apply -f <STORAGE_CLASS_MANIFEST_NAME>
For more details on persistent volumes, refer to the Persitent volumes and PVCs section.
-
Connect to the cluster via
kubectl. -
Display the manifest of the affected pod using the command:
kubectl describe pod <POD_NAME> -
Compare the resources specified in the
resources.requestsblock with the parameters of the VMs in the respective node groups. -
If there are not enough resources, add a new node group with a configuration template that matches the requested resources.
For more details, refer to the Resource limiting section and the official Kubernetes documentation.
If the issue persists, contact technical support.