Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45467 from ddysher/kubectl-describe-controllerRef
Automatic merge from submit-queue Fix kubectl describe for pods with controllerRef **What this PR does / why we need it**: kubectl describe doesn't take controllerRef into consideration, resulting confusing result. e.g. if we have two replicaset with the same selector, one with 1 replica and the other 2 replicase, then both replicaset will show 3 running pods. ```sh $ kubectl describe rs replicaset-2 Name: replicaset-2 Namespace: default Selector: environment=prod Labels: environment=prod Annotations: <none> Replicas: 2 current / 2 desired Pods Status: 3 Running / 0 Waiting / 0 Succeeded / 0 Failed Pod Template: Labels: environment=prod Containers: created-from-replicaset: Image: nginx Port: Environment: <none> Mounts: <none> Volumes: <none> Events: FirstSeen LastSeen Count From SubObjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 5m 5m 1 replicaset-controller Normal SuccessfulCreate Created pod: replicaset-2-39szb 5m 5m 1 replicaset-controller Normal SuccessfulCreate Created pod: replicaset-2-470jr ``` **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # xref #24946 **Special notes for your reviewer**: **Release note**: ```release-note Fix kubectl describe for pods with controllerRef ```
- Loading branch information