From d5628e6944e88368bdc34b2288cc5792e3520127 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Mon, 20 Aug 2018 18:33:51 +0100 Subject: [PATCH] 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 --- content/en/docs/reference/kubectl/conventions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/reference/kubectl/conventions.md b/content/en/docs/reference/kubectl/conventions.md index 70125b743a..05ae60a048 100644 --- a/content/en/docs/reference/kubectl/conventions.md +++ b/content/en/docs/reference/kubectl/conventions.md @@ -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.