diff --git a/pkg/kubectl/version.go b/pkg/kubectl/version.go index 4bb6b516bc502..ad65769a304f8 100644 --- a/pkg/kubectl/version.go +++ b/pkg/kubectl/version.go @@ -26,13 +26,14 @@ import ( ) func GetVersion(w io.Writer, kubeClient client.Interface) { + GetClientVersion(w) + serverVersion, err := kubeClient.ServerVersion() if err != nil { fmt.Printf("Couldn't read version from server: %v\n", err) os.Exit(1) } - GetClientVersion(w) fmt.Fprintf(w, "Server Version: %#v\n", *serverVersion) }