53

enter image description here

What does "Does not have minimum availability" mean?

A GitHub discussion was found, but it is not clear to me what the error message means.

4
  • 1
    Not enough cpu share or memory exhausted...
    – Tensibai
    Apr 27, 2018 at 13:32
  • Hi @030, how you have fixed this issue? please! Jul 5, 2018 at 6:25
  • @AbdulRehman Please check the accepted answer
    – 030
    Jul 5, 2018 at 16:36
  • 1
    In my case I had only 2 t2.micro EC2 instances :) Adding more resolved the issue.
    – x-yuri
    Oct 1, 2021 at 0:28

6 Answers 6

27

As @Tensibai indicated in one the comments, this could be caused as there is insufficient CPU or memory, but that is not always the case.

For example, a helm chart was just deployed, it failed and the workload in GCP indicated that:

Pod errors: CrashLoopBackOff

Based on the comment of @Tensibai the first impression was that there were insufficient resources, but further analysis using kubectl describe pod <pod-name> indicated that in this case the livenessProbe check failed:

Liveness probe failed: Get http://10.16.0.13:80/: dial 
tcp 10.16.0.13:80: getsockopt: connection refused

In summary, the Does not have minimum availability message is generic. Multiple issues could trigger this and more in dept analysis is required to find the actual error.

4
  • Hi @030, what is the solution? Jul 5, 2018 at 5:37
  • 1
    @AbdulRehman the livenessProbe failed
    – 030
    Jul 5, 2018 at 16:47
  • 2
    Does not have minimum availability simply means that not enough pods are running to meet the required replicasets then? Oct 3, 2019 at 17:59
  • 3
    Kubernetes declarative approach works well but is hell to debug. your answer revealed more information! I wonder why the error doesn't appear in the forefront Aug 26, 2020 at 6:34
4

Just want to throw out an example of it not being the CPU / mem.

I remade a cluster, which included a new node pool, nodes, etc. Then tried re-deploying some of the pods that were on the previous cluster. 3 of them were working, and one kept showing "Does not have minimum availability".

It turns out, the pod in question's deployment file had spec.template.spec.nodeName hard-coded to one of the nodes from the previous cluster. In the new cluster, that node does not exist, so it failed.

Review your k8s deployment file (.yaml or .json) if you are running into this issue and the other solutions don't work. Maybe even service files as well.

3

I have faced a similar error for my Gitlab runner deployment on the GKE cluster. As you can see from the error, something is wrong with our pods. Why shouldn't we go and check the pod status?

kubectl describe pods -n namespace 

You will get a fair idea about what's the real issue behind the error “Does not have minimum availability”.

In my case, the node was unable to pull the image for my deployment from the google container registry (GCR). I checked the permission for the service account used for k8s-cluster to pull the images from GCR.

I provided the correct roles and then it worked. Roles:

  • storage
  • object
  • viewer
1

If your persistent volumes aren't creating, it'll cause this error. So add DISK to CPU/Mem/NodeSpec requirements.

0

Chinmay Mandal answer is legend. Basically this saved me a lot of time kubectl describe pods -n namespace. Just read through the file and in my case I had the k8s "taints" wrong, and for some reason was impacting on how the pods gather resources from node.

0

I installed a helm chart ok. Then uninstalled it and installed it again. Then I got this error on some nodes. For me the solution was to delete the cluster and recreated it. It's not a great solution but could be worth a try.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.