Merge pull request #35543 from philips/improve-version

Automatic merge from submit-queue

kubectl: add less verbose version

The kubectl version output is very complex and makes it hard for users
and vendors to give actionable information. For example during the
recent Kubernetes 1.4.3 TLS security scramble I had to write a one-liner
for users to get out the version number to give to figure out if they
are vulnerable:

```
$ kubectl version | grep -i Server | sed  -n 's%.*GitVersion:"\([^"]*\).*%\1%p'
```

Instead this patch outputs simply output by default

```
./kubectl version
Client Version: v1.4.3
Server Version: v1.4.3
```

Adding the `--verbose` flag will output the old format.
This commit is contained in:
Kubernetes Submit Queue
2016-11-14 22:39:21 -08:00
committed by GitHub
5 changed files with 18 additions and 33 deletions

View File

@@ -151,6 +151,9 @@ generation, etc., and display the output
* `--output-version=...`: Convert the output to a different API group/version
* `--short`: Output a compact summary of normal output; the format is subject
to change and is optimizied for reading not parsing.
* `--validate`: Validate the resource schema
## Output conventions