From 585024554c0fa3d6617a63ae75063b525e1829f9 Mon Sep 17 00:00:00 2001 From: Marcelo Giles Date: Sun, 30 Apr 2023 17:36:24 -0700 Subject: [PATCH] Add version information to kubectl cheat sheet --- content/en/docs/reference/kubectl/cheatsheet.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/en/docs/reference/kubectl/cheatsheet.md b/content/en/docs/reference/kubectl/cheatsheet.md index 488119c0d1..a8d789079f 100644 --- a/content/en/docs/reference/kubectl/cheatsheet.md +++ b/content/en/docs/reference/kubectl/cheatsheet.md @@ -15,6 +15,7 @@ card: This page contains a list of commonly used `kubectl` commands and flags. +These instructions are for Kubernetes {{< skew currentVersion >}}. To check the version, use the `kubectl version` command. ## Kubectl autocomplete @@ -85,7 +86,7 @@ kubectl config set-context gce --user=cluster-admin --namespace=foo \ kubectl config unset users.foo # delete user foo -# short alias to set/show context/namespace (only works for bash and bash-compatible shells, current context to be set before using kn to set namespace) +# short alias to set/show context/namespace (only works for bash and bash-compatible shells, current context to be set before using kn to set namespace) alias kx='f() { [ "$1" ] && kubectl config use-context $1 || kubectl config current-context ; } ; f' alias kn='f() { [ "$1" ] && kubectl config set-context --current --namespace $1 || kubectl config view --minify | grep namespace | cut -d" " -f6 ; } ; f' ```