How does scale down works in Cluster Autoscaler in OCP 4?

Solution Verified - Updated

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4
  • Cluster Autoscaler

Issue

  • On which parameters, does the Cluster Autoscaler scale down the nodes in OCP 4?
  • What settings needs to be done in Cluster Autoscaler for scaling down the nodes?

Resolution

Disclaimer: Links contained herein to external website(s) are provided for convenience only. Red Hat has not reviewed the links and is not responsible for the content or its availability. The inclusion of any link to an external website does not imply endorsement by Red Hat of the website or their entities, products or services. You agree that Red Hat is not responsible or liable for any loss or expenses that may result due to your use of (or reliance on) the external site or content.

An explanation of how the Cluster Autoscaler works is now included in the documentation: About the cluster autoscaler.
There is additional information of how scale-down works in the Content from github.com is not included.cluster autoscaler upstream FAQ. Refer also to Content from github.com is not included.the types of pods that can prevent the cluster autoscaler from removing a node.

Note: Even if a node is currently using low CPU/Memory as shown by oc adm top nodes command, the Cluster Autoscaler doesn't check the current utilization but the requests of all the pods in the node. Refer to the "Diagnostic Steps" section to check the CPU and Memory requests of all pods running on the nodes.

For preventing that a node running a specific pod to being removed, refer to How to make cluster autoscaler skip a node for scale down.

Root Cause

The information about how the Cluster Autoscaler works is now included in the documentation: About the cluster autoscaler.

Diagnostic Steps

Check if sum of CPU and Memory requests of all pods running on the nodes is smaller than 50% of the node's allocatable:

$ oc describe node <node-name>

Refer to Increase the verbosity or log level of the Cluster Autoscaler if additional information is needed.

SBR
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.