Skip to content

The garbage collector deleted a ReplicaSet, but the corresponding deployment exists and is normal. #132500

Open
@Black-max12138

Description

@Black-max12138

What happened?

I have a deployment with two ReplicaSets. After the controller-manager restarts, one of the ReplicaSets is garbage collected.
The log is as follows:

I0623 01:43:01.380785  541479 garbagecollector.go:540] "Processing item" item="[apps/v1/ReplicaSet, namespace: manager, name: weaveruntime-ddbfd06e-4f87-11f0-8f11-fa163e115ee5-75b469c8c9, uid: a8886182-363e-4af8-a3ab-2d04014c3a87]" vi
rtual=false
I0623 01:43:01.406010  541479 garbagecollector.go:540] "Processing item" item="[apps/v1/ReplicaSet, namespace: manager, name: weaveruntime-ddbfd06e-4f87-11f0-8f11-fa163e115ee5-79c4749f9f, uid: 1a42d1c2-8027-4f64-836c-618fcf1bb037]" vi
rtual=false
I0623 01:43:02.397069  541479 garbagecollector.go:606] "item has at least one existing owner, will not garbage collect" item="[apps/v1/ReplicaSet, namespace: manager, name: weaveruntime-ddbfd06e-4f87-11f0-8f11-fa163e115ee5-75b469c8c9, uid: a8886182-363e-4af8-a3ab-2d04014c3a87]" owner=[{"apiVersion":"apps/v1","kind":"Deployment","name":"weaveruntime-ddbfd06e-4f87-11f0-8f11-fa163e115ee5","uid":"00a644c7-7e68-4a82-b8d9-711a61743ea3","controller":true,"blockOwnerDeletion":true}]
I0623 01:43:02.417398  541479 garbagecollector.go:679] "Deleting item" item="[apps/v1/ReplicaSet, namespace: manager, name: weaveruntime-ddbfd06e-4f87-11f0-8f11-fa163e115ee5-79c4749f9f, uid: 1a42d1c2-8027-4f64-836c-618fcf1bb037]" propagationPolicy="Background"
I0623 01:43:03.355577  541479 garbagecollector.go:540] "Processing item" item="[apps/v1/Deployment, namespace: manager, name: weaveruntime-ddbfd06e-4f87-11f0-8f11-fa163e115ee5, uid: 4269d8f5-0ada-4fe6-bc4e-513ad0c1f2d2]" virtual=true

I don't know why this is happening.

What did you expect to happen?

ReplicaSet should not be deleted

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

N/A

Anything else we need to know?

No response

Kubernetes version

$ kubectl version
# paste output here

1.31

Cloud provider

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.needs-sigIndicates an issue or PR lacks a `sig/foo` label and requires one.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions