Files
kubernetes/pkg
Kubernetes Submit Queue 54db2273eb Merge pull request #65837 from clandry94/pvc_describe_claimed_by
Automatic merge from submit-queue (batch tested with PRs 65838, 65837). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

output which pods are a pvc in use when kubectl describe pvc is run

**What this PR does / why we need it**:
This PR implements a feature request to display the pods mounted to a PVC when `kubectl describe pvc` is ran. We need it since the only way to see which pods are bound to a PVC is by checking the volume mounts of each individual pod in the namespace. 

Example Output:
```
$ kubectl get pods,pvc
NAME     READY  STATUS    RESTARTS   AGE
test-pod   1/1       Running       0                2h

NAME      STATUS    VOLUME                                   CAPACITY  ACCESS MODES   STORAGECLASS        AGE
test-pvc  Bound     pvc-718681dd-70cc-11e7-aa14-42010af00029   100Gi      RWO            us-east1-b          345d
```

```
$ kubectl describe pvc
Name:          elasticsearch-data-elasticsearch-data-us-east1-b-0
Namespace:     partners-production
StorageClass:  us-east1-b
Status:        Bound
Volume:      pvc-718681dd-70cc-11e7-aa14-42010af00029
Labels:       <none>
Annotations:   <none>
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      1Gi
Access Modes:  RWO
Events:        <none>
Mounted By:     test-pod
```

Pods using the PVC are shown with the `Mounted By` field

**Which issue(s) this PR fixes**:
Closes #65233 

**Special notes for your reviewer**:

**Release note**:
```release-note
Running `kubectl describe pvc` now shows which pods are mounted to the pvc being described with the `Mounted By` field
```
2018-07-06 11:03:05 -07:00
..
2018-06-29 20:36:17 +02:00
2018-06-22 16:22:57 -07:00
2018-06-27 13:31:10 +02:00
2018-06-22 16:22:57 -07:00
2018-06-22 16:22:57 -07:00
2018-06-27 13:31:10 +02:00
2018-07-05 11:07:56 +08:00
2018-06-22 16:22:57 -07:00
2018-06-22 16:22:57 -07:00
2018-06-22 16:22:57 -07:00
2018-02-12 10:54:33 -05:00
2018-06-22 16:22:57 -07:00
2018-06-22 16:22:57 -07:00
2018-06-27 14:21:27 +08:00
2018-06-22 16:22:57 -07:00
2018-07-03 08:03:31 +00:00
2018-06-22 16:22:57 -07:00
2018-06-27 13:31:10 +02:00