From a9a36fcf4b85d9ac678d189aa4116b950864a67a Mon Sep 17 00:00:00 2001 From: xiangpengzhao Date: Wed, 10 May 2017 12:53:14 +0800 Subject: [PATCH] Display for "kubectl get pods -o wide" when node is empty. --- pkg/printers/internalversion/printers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/printers/internalversion/printers.go b/pkg/printers/internalversion/printers.go index 85e9e5803a8..8ee1b91c9ae 100644 --- a/pkg/printers/internalversion/printers.go +++ b/pkg/printers/internalversion/printers.go @@ -345,6 +345,9 @@ func printPodBase(pod *api.Pod, w io.Writer, options printers.PrintOptions) erro if podIP == "" { podIP = "" } + if nodeName == "" { + nodeName = "" + } if _, err := fmt.Fprintf(w, "\t%s\t%s", podIP, nodeName,