Skip to content

Commit 9d96787

Browse files
authored
Merge pull request #40912 from mrgiles/40582_kubectl_cheat_sheet_version
Add Kubernetes version information to the kubectl cheat sheet
2 parents 12447f0 + ff5d7b9 commit 9d96787

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

content/en/docs/reference/kubectl/cheatsheet.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ card:
1515

1616
This page contains a list of commonly used `kubectl` commands and flags.
1717

18+
{{< note >}}
19+
These instructions are for Kubernetes v{{< skew currentVersion >}}. To check the version, use the `kubectl version` command.
20+
{{< /note >}}
1821
<!-- body -->
1922

2023
## Kubectl autocomplete
@@ -85,7 +88,7 @@ kubectl config set-context gce --user=cluster-admin --namespace=foo \
8588

8689
kubectl config unset users.foo # delete user foo
8790

88-
# 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)
91+
# 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)
8992
alias kx='f() { [ "$1" ] && kubectl config use-context $1 || kubectl config current-context ; } ; f'
9093
alias kn='f() { [ "$1" ] && kubectl config set-context --current --namespace $1 || kubectl config view --minify | grep namespace | cut -d" " -f6 ; } ; f'
9194
```

0 commit comments

Comments
 (0)