Difference between revisions of "Kubectx"

From wikieduonline
Jump to navigation Jump to search
Line 6: Line 6:
  
 
  kubectx
 
  kubectx
 +
 +
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
  
  
 
  [[kubectl config get-contexts]]
 
  [[kubectl config get-contexts]]
 +
 +
 +
{{kubectx}}

Revision as of 20:22, 28 September 2022

kubectx

brew install kubectx
kubectx
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


kubectl config get-contexts


Kubernetes contexts: kubectx, kubens, ~/.kube/config, kubectl ctx

Advertising: