Difference between revisions of "Kubectx"
Jump to navigation
Jump to search
(6 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
** <code>[[scoop install kubectx]]</code> | ** <code>[[scoop install kubectx]]</code> | ||
Linux: | Linux: | ||
− | [[kubectl krew install]] | + | [[kubectl krew install ctx]] |
[[kubectl krew install]] ns | [[kubectl krew install]] ns | ||
Line 27: | Line 27: | ||
kubectx - : switch to the previous context | kubectx - : switch to the previous context | ||
kubectx -c, --current : show the current context name | kubectx -c, --current : show the current context name | ||
− | kubectx <NEW_NAME>=<NAME> : rename context <NAME> to <NEW_NAME> | + | kubectx <NEW_NAME>=<NAME> : [[rename context]] <NAME> to <NEW_NAME> |
kubectx <NEW_NAME>=. : rename current-context to <NEW_NAME> | kubectx <NEW_NAME>=. : rename current-context to <NEW_NAME> | ||
kubectx -d <NAME> [<NAME...>] : delete context <NAME> ('.' for current-context) | kubectx -d <NAME> [<NAME...>] : delete context <NAME> ('.' for current-context) | ||
Line 35: | Line 35: | ||
kubectx -h,--help : show this message | kubectx -h,--help : show this message | ||
+ | |||
+ | == Activites == | ||
+ | * [[Kubernetes rename context]]: <code>kubectx NEW_NAME=OLD_NAME</code> | ||
== Related == | == Related == | ||
Line 41: | Line 44: | ||
* <code>[[--context]]</code> | * <code>[[--context]]</code> | ||
* <code>[[kubectl --cluster]]</code> | * <code>[[kubectl --cluster]]</code> | ||
+ | * <code>[[kubectl-ctx]]</code> | ||
== See also == | == See also == | ||
+ | * {{ctx}} | ||
* {{kubectx}} | * {{kubectx}} | ||
[[Category:K8s]] | [[Category:K8s]] |
Latest revision as of 10:42, 21 June 2024
kubectx
tool to manage K8s contexts
- MacOS:
brew install kubectx
- Windows:
Linux:
kubectl krew install ctx kubectl krew install ns
kubectx
kubectx cluster_name_to_switch Switched to context "cluster_name_to_switch".
kubectx YOUR_NEW_NAME=YOUR_OLD_NAME Context "arn:aws:eks:eu-central-1:123123414:cluster/your-ugly-name" renamed to "YOUR_NEW_NAME".
Contents
Help[edit]
kubectx --help USAGE: kubectx : list the contexts kubectx <NAME> : switch to context <NAME> kubectx - : switch to the previous context kubectx -c, --current : show the current context name kubectx <NEW_NAME>=<NAME> : rename context <NAME> to <NEW_NAME> kubectx <NEW_NAME>=. : rename current-context to <NEW_NAME> kubectx -d <NAME> [<NAME...>] : delete context <NAME> ('.' for current-context) (this command won't delete the user/cluster entry that is used by the context) kubectx -u, --unset : unset the current context
kubectx -h,--help : show this message
Activites[edit]
- Kubernetes rename context:
kubectx NEW_NAME=OLD_NAME
Related[edit]
See also[edit]
Advertising: