Spot Instances Node Pool not scaling up

Nurul Jannah Abdul Aziz 20 Reputation points
2025-04-18T06:13:14.58+00:00

Hello,

I have set up Spot Instances node pool. From my observation, when the pod got evicted by Azure, it is not automatically scale again even though AKS Spot node pool is set to use autoscaler. During the time, the container was in "Waiting" state and the pod had "FailedScheduling" error with the message:

0/5 nodes are available: 2 node(s) had untolerated taint {node.kubernetes.io/unreachable: }, 3 node(s) didn't match Pod's node affinity/selector. preemption: 0/5 nodes are available: 5 Preemption is not helpful for scheduling. What can be the reason for this issue?

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,407 questions
0 comments No comments
{count} votes

Accepted answer
  1. Abiola Akinbade 27,530 Reputation points Moderator
    2025-04-18T07:21:21.8866667+00:00

    So from the error, looks like two nodes are marked as unreachable due to the taint and your pod has node affinity requirements that your existing nodes don't satisfy. To troubleshoot:

    Check that your cluster autoscaler is properly configured viable max/min counts:

    kubectl get deployment cluster-autoscaler -n kube-system -o yaml
    

    Check your pod specs for any node affinity or node selector requirements

    kubectl  get pod <pod-name> -o yaml
    

    While unlikely, you can also check if you've hit any quotas or limits for your subscription or region.

    As a temporary work around you can also add tolerations to your pod deployments. Probably something like this:

    - key: "node.kubernetes.io/unreachable"
      operator: "Exists"
      effect: "NoSchedule"
      tolerationSeconds: 30
    

    You can mark it 'Accept Answer' and 'Upvote' if this helped you

    Regards,

    Abiola

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.