zhranklin / easy_kubectl Goto Github PK
View Code? Open in Web Editor NEWKubectl command namespace switcher
License: Apache License 2.0
Kubectl command namespace switcher
License: Apache License 2.0
I see it will actually exec kubectl -n default --context=yyy config current-context
but the context
arg is not respected in this cmd.
under zsh
version: v1.0.18
kubectl version: kubectl_1.20.4_linux
KUBE_NS env empty when login, thus k
behaviors improperly until manually choose a ns. That means no persistence is applied.
will gen a invalid compl file.
update_k
updating to version: v1.1.3
sed: -e expression #1, char 3: unexpected `,'
-n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default -n=default /home/yonka/.easy_kubectl/compl_zsh:400: parse error: condition expected: 0e
-n=default -n=default -n=default -n=default -n=default -n=default /home/yonka/.easy_kubectl/compl_zsh:488: parse error: condition expected: 0e
-n=default -n=default /home/yonka/.easy_kubectl/compl_zsh:508: parse error: condition expected: 0e
/home/yonka/.easy_kubectl/compl_zsh:568: parse error: condition expected: 0e
-n=default -n=default _tags:comptags:36: can only be called from completion function
_tags:comptry:55: can only be called from completion function
_tags:comptags:60: can only be called from completion function
_tags:comptags:67: can only be called from completion function
-n=default -n=default -n=default /home/yonka/.easy_kubectl/compl_zsh:680: parse error: condition expected: 0e
-n=default -n=default -n=default -n=default -n=default -n=default _arguments:comparguments:325: can only be called from completion function
-n=default -n=default -n=default -n=default -n=default -n=default -n=default Current Namespace:
default
successfully installed easy_kubectl!
in some env we can not access the internet, can we provide a way to package all files including dependencies like fzf
to a tar.gz file?
k config set-context --current
kubectl -n default config set-context --current
Error: unknown shorthand flag: 'n' in -n
See 'kubectl config set-context --help' for usage.
under zsh
such as k get p<tab>
can not complete
platform: macos m1
➜ easy_kubectl export FZF_TARGET=linux_amd64
➜ easy_kubectl tag=$(wget -qO - https://api.github.com/repos/zhranklin/easy_kubectl/releases/latest|grep tag_name|sed 's/.*tag_name": "//g; s/",.*//g')
➜ easy_kubectl wget -qO - https://github.com/zhranklin/easy_kubectl/archive/$tag.tar.gz | tar xzO easy_kubectl-$tag/install.sh > install.sh
➜ easy_kubectl GEN_OFFLINE=1 source install.sh > install-offline.sh
base64: invalid option -- w
Usage: base64 [-hvDd] [-b num] [-i in_file] [-o out_file]
-h, --help display this message
-Dd, --decode decodes input
-b, --break break encoded string into num character lines
-i, --input input file (default: "-" for stdin)
-o, --output output file (default: "-" for stdout)
fzf: Write error
tar: Error exit delayed from previous errors.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.