kubectl-ctx

command module
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2022 License: MIT Imports: 4 Imported by: 0

README

Release Software License Go Report Card

kubectl ctx plugin

Simple Plugin to display/change the current kube context in your KUBECONFIG.

Installation

Pre-compiled statically linked binaries are available on the releases page. Binary must be placed anywhere in $PATH named kubectl-ctx with execute permissions.
For further information, see the offical documentation on plugins here.

Compatibility

Known to work on Windows and Linux. Requires kubectl >= 1.12 (tested with versions >1.12).

Examples

For all the examples, assume you have the following contexts.

foo
bar
baz
localhost

display contexts

Current context is displayed in a different color.

$ kubectl ctx
bar
baz
foo
localhost

Substring matching can be used to display contexts. For example if you are searching a context named ba simply type:

$ kubectl ctx ba
bar
baz

change current context

You can switch the context by providing an exact name:

$ kubectl ctx foo
current context set to "foo"

But it's also possible to switch to the localhost context by typing a substring (as long as it is a unique name), for example:

$ kubectl ctx local
current context set to "localhost"

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL