Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 1003 Bytes

README.md

File metadata and controls

43 lines (31 loc) · 1003 Bytes

kubectl-use

Plugin for simple switch kubernetes contexts and namespaces

Example usage

# kubectl use prod
Switched to context "prod".

# kubectl use default
Switched to namespace "default".

# kubectl use stage kube-system
Switched to context "stage".
Switched to namespace "kube-system".

Installation

using krew:

kubectl krew index add kvaps https://github.com/kvaps/krew-index
kubectl krew install kvaps/use

or using curl:

curl -LO https://github.com/kvaps/kubectl-use/raw/master/kubectl-use
chmod +x ./kubectl-use
sudo mv ./kubectl-use /usr/local/bin/kubectl-use

Autocompletion

Currently krew does not support for installing completion, thus only curl method is available:

curl -LO https://github.com/kvaps/kubectl-use/raw/master/kubectl_complete-use 
chmod +x ./kubectl_complete-use
sudo mv ./kubectl_complete-use /usr/local/bin/kubectl_complete-use