Merge pull request #36396 from aveshagarwal/master-display-pod-node-selectors

Automatic merge from submit-queue (batch tested with PRs 38783, 36396)

Display pod node selectors with kubectl describe.

**What this PR does / why we need it**:
This PR fixes kubectl describe so that it now shows associated node selectors with pods.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
```

@kubernetes/rh-cluster-infra @kubernetes/kubectl
pull/6/head
Kubernetes Submit Queue 2016-12-14 17:54:52 -08:00 committed by GitHub
commit db867c0c9d
1 changed files with 1 additions and 0 deletions

View File

@ -540,6 +540,7 @@ func describePod(pod *api.Pod, events *api.EventList) (string, error) {
}
describeVolumes(pod.Spec.Volumes, w, "")
w.Write(LEVEL_0, "QoS Class:\t%s\n", qos.InternalGetPodQOS(pod))
printLabelsMultiline(w, "Node-Selectors", pod.Spec.NodeSelector)
printTolerationsInAnnotationMultiline(w, "Tolerations", pod.Annotations)
if events != nil {
DescribeEvents(events, w)