From f1cc668d11e8efc6281f2da6f7d91153a55b546a Mon Sep 17 00:00:00 2001 From: Vignir Hafsteinsson Date: Tue, 19 Mar 2019 18:49:44 +0000 Subject: [PATCH] Add information about node affinity to FAQ I noticed that information about node affinity support is pretty hard to obtain. I found it eventually on Slack and have seen others looking for the information. See https://kubernetes.slack.com/messages/C09R1LV8S So, I'm adding a Q to the FAQ with this information. --- cluster-autoscaler/FAQ.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cluster-autoscaler/FAQ.md b/cluster-autoscaler/FAQ.md index e1819912975f..395d6443f00f 100644 --- a/cluster-autoscaler/FAQ.md +++ b/cluster-autoscaler/FAQ.md @@ -41,6 +41,7 @@ this document: * [How fast is HPA when combined with CA?](#how-fast-is-hpa-when-combined-with-ca) * [Where can I find the designs of the upcoming features?](#where-can-i-find-the-designs-of-the-upcoming-features) * [What are Expanders?](#what-are-expanders) + * [Does CA respect node affinity when selecting node groups to scale up?](#does-ca-respect-node-affinity-when-selecting-node-groups-to-scale-up) * [What are the parameters to CA?](#what-are-the-parameters-to-ca) * [Troubleshooting](#troubleshooting) * [I have a couple of nodes with low utilization, but they are not scaled down. Why?](#i-have-a-couple-of-nodes-with-low-utilization-but-they-are-not-scaled-down-why) @@ -606,6 +607,11 @@ after scale-up. This is useful when you have different classes of nodes, for exa would match the cluster size. This expander is described in more details [HERE](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/proposals/pricing.md). Currently it works only for GCE and GKE (patches welcome.) +### Does CA respect node affinity when selecting node groups to scale up? +CA respects `nodeSelector` and `requiredDuringSchedulingIgnoredDuringExecution` in nodeAffinity given that you have labelled your node groups accordingly. If there is a pod that cannot be scheduled with either `nodeSelector` or `requiredDuringSchedulingIgnoredDuringExecution` specified, CA will only consider node groups that satisfy those requirements for expansion. + +However, CA does not consider "soft" constraints like `preferredDuringSchedulingIgnoredDuringExecution` when selecting node groups. That means that if CA has two or more node groups available for expansion, it will not use soft constraints to pick one node group over another. + ************ ### What are the parameters to CA?