kubernetes: PodDeletionCost occasionally doesn't work

What happened?

I created a ReplicationController with 1 replicas: analysis-3-8hplt

Then I set the replicas of the rc to 2 using the scale command, Created a new pod: analysis-3-fbcdl

(2024-07-11T22:38:10.280375Z )Next, I set the annotation controller.kubernetes.io/pod-deletion-cost: "-1" for the pod: analysis-3-8hplt

After setting the annotation successfully, (2024-07-11T22:38:10.904066Z)Then I set the replicas of the rc to 1 using the scale command, but analysis-3-fbcdl was scaled.

What did you expect to happen?

analysis-3-8hplt pod was scaled.

How can we reproduce it (as minimally and precisely as possible)?

Refer to the description above

Anything else we need to know?

No response

Kubernetes version

$ kubectl version
1.22 

Cloud provider

no

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Install tools

Container runtime (CRI) and version (if applicable)

Related plugins (CNI, CSI, …) and versions (if applicable)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (9 by maintainers)

Most upvoted comments

I set the controller.kubernetes.io/pod-deletion-cost: "-1" annotation for analysis-3-8hplt