Skip to content

HPA scale-in: is pod resource usage taken into account to prioritize pods to be deleted ? #124821

Closed as not planned
@remiville

Description

@remiville

Hello,

I know that in case of node resource pressure, the controller prioritizes pods to be evicted, for example in case of node memory pressure, pods using more memory than requested are prioritised for deletion.

But for HPA scale-in I struggle to find if and how pods are sorted to prioritize them for deletion.

While looking at the PodDeletionCost feature PR I found this priorization comment in the code https://github.com/ahg-g/kubernetes/blob/2d88d2d993b36c231fdc7537212685544469c517/pkg/controller/controller_utils.go#L785

Does it mean that no resource usage is taken into account when the controller has to select pods to be deleted during a scale in event ?

For example, if a scale-in occurs because the CPU usage is lower than the threshold set in the HPA, the controller will select pods to be deleted without prioritizing them by their current CPU usage, right ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.sig/autoscalingCategorizes an issue or PR as relevant to SIG Autoscaling.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions