From e0f9b88f02b6cb2162d81c3a32bc9902e968b897 Mon Sep 17 00:00:00 2001 From: Erik Osterman Date: Tue, 15 May 2018 18:50:59 -0700 Subject: [PATCH] Explain how to fix NoVolumeZoneConflict (#57) --- .../faq/kubernetes-no-volume-zone-conflict.md | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 content/faq/kubernetes-no-volume-zone-conflict.md diff --git a/content/faq/kubernetes-no-volume-zone-conflict.md b/content/faq/kubernetes-no-volume-zone-conflict.md new file mode 100644 index 000000000..bebbc06ea --- /dev/null +++ b/content/faq/kubernetes-no-volume-zone-conflict.md @@ -0,0 +1,31 @@ +--- +title: "No nodes are available that match all of the predicates: NoVolumeZoneConflict (4)" +description: "Fix is to most likely increase the number of worker nodes so they are evenly spread across all availability zones." +tags: +- kubernetes +- kops +- multi-az +--- + +# Question + +When trying to deploy a stateful service (e.g. postgres, mongodb, redis), I get the following error: + +``` + Type Reason Age From Message + ---- ------ ---- ---- ------- + Warning FailedScheduling 5m (x91 over 30m) default-scheduler No nodes are available that match all of the predicates: NoVolumeZoneConflict (4), PodToleratesNodeTaints (3). +``` + +# Answer + +This is likely caused by having an uneven distribution of worker nodes in availability zones. In small clusters (e.g. test clusters), this may happen if the number of workers nodes is less than the number of masters. +Basically, if nodes don't exist in the same availability zones as masters, there's a risk that volumes get provisioned in an availaiblity-zone where there are no worker nodes. When this happens, +the creation of pods gets stuck. + +In your Geodesic Module, ensure that `NODE_MIN_SIZE` is greater or equal to the number of `KOPS_AVAILABILITY_ZONES` in the `ENV` settings of your `Dockerfile`. + + +# References + +- https://github.com/kubernetes/kubernetes/issues/39178#issuecomment-269872832