mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
34 lines
516 B
Plaintext
34 lines
516 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# 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}}`
|