HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

kubectx — Utility to manage and switch between `kubectl` contexts. More information: <https://manned.org/kubec

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandbetweenandclimanageswitchkubectxutility

Problem

How to use the kubectx command: Utility to manage and switch between kubectl contexts. More information: <https://manned.org/kubectx>.

Solution

kubectx — Utility to manage and switch between kubectl contexts. More information: <https://manned.org/kubectx>.

List the contexts:
kubectx


Switch to a named context:
kubectx {{name}}


Switch to the previous context:
kubectx -


Rename a named context:
kubectx {{alias}}={{name}}


Show the current named context:
kubectx {{[-c|--current]}}


Delete a named context:
kubectx -d {{name}}

Code Snippets

List the contexts

kubectx

Switch to a named context

kubectx {{name}}

Switch to the previous context

kubectx -

Rename a named context

kubectx {{alias}}={{name}}

Show the current named context

kubectx {{[-c|--current]}}

Context

tldr-pages: common/kubectx

Revisions (0)

No revisions yet.