Estos contenidos se han traducido de forma automática para su comodidad, pero Huawei Cloud no garantiza la exactitud de estos. Para consultar los contenidos originales, acceda a la versión en inglés.
Actualización más reciente 2024-09-10 GMT+08:00

Pod Scale-in Priorities

Scale-in Priorities

Pod scale-in is performed based on the following priorities:

  1. Pods that are not scheduled
  2. Pod Pending < Pod Unknown < Pod Running
  3. Not ready < Ready
  4. Pod with a specific label (cce.io/priordeletion)
  5. Doubled up < Not doubled up (nodes with more pods are first downsized)
  6. Pods that take a long time to be ready for scale-in
  7. Pods that are frequently restarted
  8. Pods with an earlier createtimestamp

Preferential Scale-in of Old Pods

  • Where such scale-in does not work:

    According to the preceding priorities, assume that the number of nodes is 2 (the same specifications) and the number of pods in a Deployment is 5 (or any odd number), three pods distributed on node A and two on node B. If the number of pods is reduced to 3, Rule 5 is performed first, and the system determines that the node to be scaled in is node A. Then Rule 6 is performed. After an old pod is deleted, it is found that no old pod exists and the scale-in node remains node A. In this case, a new pod will be deleted.

  • Where such scale-in works: Assume that the number of nodes is 2 (the same specifications) and the number of Deployment pods is 6 (or any even number). These pods are distributed evenly on nodes A and B. If the number of pods is reduced to 4, the system determines that the Rule 5 is not met. In this case, both nodes A and B will be scaled in. Then, the system performs Rule 6 to sort the pods on the two nodes and deletes two old pods.