diff --git a/cmd/vela-kubernetes/command.go b/cmd/vela-kubernetes/command.go index 2db4722..8499667 100644 --- a/cmd/vela-kubernetes/command.go +++ b/cmd/vela-kubernetes/command.go @@ -62,7 +62,7 @@ func versionCmd(c *Config) *exec.Cmd { } // add flag for version kubectl command - flags = append(flags, "version", "--short") + flags = append(flags, "version", "--output=yaml") return exec.Command(_kubectl, flags...) } diff --git a/cmd/vela-kubernetes/command_test.go b/cmd/vela-kubernetes/command_test.go index 745d767..f46981e 100644 --- a/cmd/vela-kubernetes/command_test.go +++ b/cmd/vela-kubernetes/command_test.go @@ -40,7 +40,7 @@ func TestKubernetes_versionCmd(t *testing.T) { fmt.Sprintf("--context=%s", c.Context), fmt.Sprintf("--namespace=%s", c.Namespace), "version", - "--short", + "--output=yaml", ) got := versionCmd(c)