Print PodIP along with Pod.Name for kubectl get pod <id>

pull/6/head
Dawn Chen 2015-01-09 14:18:10 -08:00
parent da8dc5360e
commit a7ad7f8207
1 changed files with 2 additions and 1 deletions

View File

@ -240,8 +240,9 @@ func printPod(pod *api.Pod, w io.Writer) error {
if len(containers) > 0 {
firstContainer, containers = containers[0], containers[1:]
}
_, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\n",
_, err := fmt.Fprintf(w, "%s/%s\t%s\t%s\t%s\t%s\t%s\n",
pod.Name,
pod.Status.PodIP,
firstContainer.Name,
firstContainer.Image,
podHostString(pod.Status.Host, pod.Status.HostIP),