From dc9f8bf21fe6e1835b3429a6d9af2705fee6a202 Mon Sep 17 00:00:00 2001 From: mtilson Date: Mon, 7 Feb 2022 00:43:21 +0300 Subject: [PATCH] Update content/en/docs/reference/kubectl/cheatsheet.md Co-authored-by: Tim Bannister --- content/en/docs/reference/kubectl/cheatsheet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/reference/kubectl/cheatsheet.md b/content/en/docs/reference/kubectl/cheatsheet.md index 20f5077632..8e94b3c1f0 100644 --- a/content/en/docs/reference/kubectl/cheatsheet.md +++ b/content/en/docs/reference/kubectl/cheatsheet.md @@ -74,7 +74,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 (useful for CKAD/CKA exams) +# short alias to set/show context/namespace alias kn='f() { [ "$1" ] && kubectl config set-context --current --namespace $1 || kubectl config view --minify | grep namespace | cut -d" " -f6 ; } ; f' alias kx='f() { [ "$1" ] && kubectl config use-context $1 || kubectl config current-context ; } ; f' ```