Update advice on pinning output version of 'kubectl get' (#9165)

* Update advice on pinning output version

--output-version is deprecated.
Advice paraphrased from https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#get

* add code highlighting
This commit is contained in:
Bryan Boreham 2018-08-20 18:33:51 +01:00 committed by k8s-ci-robot
parent b9bce3bf90
commit d5628e6944
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ reviewers:
For a stable output in a script:
* Request one of the machine-oriented output forms, such as `-o name`, `-o json`, `-o yaml`, `-o go-template`, or `-o jsonpath`
* Specify `--output-version`, because the output forms use a particular API version to output the resource with the exception of `-o name` output form
* Fully-qualify the version. For example, `jobs.v1.batch/myjob`. This will ensure that kubectl does not use its default version that can change over time.
* Specify `--generator` to pin to a specific behavior forever when you use generator-based commands such as `kubectl run` or `kubectl expose`
* Don't rely on context, preferences, or other implicit states.