GoogleCloudPlatform/kubernetes — pull request #3048 by saad-ali (2014-12-19 02:25:02+00:00)
Title: Fix Issue #3002: kubectl get pods/log podname don't work well together

Fixes #3002
* Modify ```kubectl get pods``` result to include container name in addition to container image.
* Modify ```kubectl get replicationcontrollers``` result to include container in addition to container image.

```kubectl get pods``` result before change:
```
$ kubectl get pods

NAME IMAGE(S) HOST LABELS STATUS
influx-grafana kubernetes/heapster_influxdb kubernetes-minion-4.c.saad-dev-vms.internal/130.211.155.47 name=influxdb Running
kubernetes/heapster_grafana
dockerfile/elasticsearch
heapster kubernetes/heapster kubernetes-minion-3.c.saad-dev-vms.internal/130.211.184.140 name=heapster Running
redis-master dockerfile/redis kubernetes-minion-2.c.saad-dev-vms.internal/130.211.188.153 name=redis-master Running
ebd1a5a6-871d-11e4-bd64-42010af0c963 brendanburns/redis-slave kubernetes-minion-3.c.saad-dev-vms.internal/130.211.184.140 name=redisslave,uses=redis-master Running
ebd333d0-871d-11e4-bd64-42010af0c963 brendanburns/redis-slave kubernetes-minion-4.c.saad-dev-vms.internal/130.211.155.47 name=redisslave,uses=redis-master Running
0c63b343-871e-11e4-bd64-42010af0c963 kubernetes/example-guestbook-php-redis kubernetes-minion-1.c.saad-dev-vms.internal/146.148.76.244 name=frontend,uses=redisslave,redis-master Running
0c63f50b-871e-11e4-bd64-42010af0c963 kubernetes/example-guestbook-php-redis kubernetes-minion-3.c.saad-dev-vms.internal/130.211.184.140 name=frontend,uses=redisslave,redis-master Running
0c662f51-871e-11e4-bd64-42010af0c963 kubernetes/example-guestbook-php-redis kubernetes-minion-4.c.saad-dev-vms.internal/130.211.155.47 name=frontend,uses=redisslave,redis-master Running
```
```kubectl get pods``` result after change:
```
kubectl get pods

POD CONTAINER(S) IMAGE(S) HOST LABELS STATUS
0c63b343-871e-11e4-bd64-42010af0c963 php-redis kubernetes/example-guestbook-php-redis kubernetes-minion-1.c.saad-dev-vms.internal/146.148.76.244 name=frontend,uses=redisslave,redis-master Running
0c63f50b-871e-11e4-bd64-42010af0c963 php-redis kubernetes/example-guestbook-php-redis kubernetes-minion-3.c.saad-dev-vms.internal/130.211.184.140 name=frontend,uses=redisslave,redis-master Running
0c662f51-871e-11e4-bd64-42010af0c963 php-redis kubernetes/example-guestbook-php-redis kubernetes-minion-4.c.saad-dev-vms.internal/130.211.155.47 name=frontend,uses=redisslave,redis-master Running
influx-grafana influxdb kubernetes/heapster_influxdb kubernetes-minion-4.c.saad-dev-vms.internal/130.211.155.47 name=influxdb Running
grafana kubernetes/heapster_grafana
elasticsearch dockerfile/elasticsearch
heapster heapster kubernetes/heapster kubernetes-minion-3.c.saad-dev-vms.internal/130.211.184.140 name=heapster Running
redis-master master dockerfile/redis kubernetes-minion-2.c.saad-dev-vms.internal/130.211.188.153 name=redis-master Running
ebd1a5a6-871d-11e4-bd64-42010af0c963 slave brendanburns/redis-slave kubernetes-minion-3.c.saad-dev-vms.internal/130.211.184.140 name=redisslave,uses=redis-master Running
ebd333d0-871d-11e4-bd64-42010af0c963 slave brendanburns/redis-slave kubernetes-minion-4.c.saad-dev-vms.internal/130.211.155.47 name=redisslave,uses=redis-master Running
```
```kubectl get replicationcontrollers``` result before change:
```
kubectl get replicationcontrollers

NAME IMAGE(S) SELECTOR REPLICAS
redisSlaveController brendanburns/redis-slave name=redisslave 2
frontendController kubernetes/example-guestbook-php-redis name=frontend 3
```
```kubectl get replicationcontrollers``` result after change:
```
kubectl get replicationcontrollers

CONTROLLER CONTAINER(S) IMAGE(S) SELECTOR REPLICAS
redisSlaveController slave brendanburns/redis-slave name=redisslave 2
frontendController php-redis kubernetes/example-guestbook-php-redis name=frontend 3
```