1、krew是一个可以轻松使用kubectl插件的工具,类似于apt、dnf或brew等工具。安装过程见链接1。
wget https://github.com/kubernetes-sigs/krew/releases/latest/download/krew-linux_amd64.tar.gz
tar -zxvf krew-linux_amd64.tar.gz
vim /etc/profile
添加这样一行: PATH=${PATH}:${HOME}/.krew/bin
# ./krew-linux_amd64 install krew
WARNING: To be able to run kubectl plugins, you need to add
the following to your ~/.bash_profile or ~/.bashrc:
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
and restart your shell.
2、