brew install kubectl
kubectl -h
brew install kubectx
# list
kubectx
# select context
kubectx docker-desktop
# previous context
kubectx -
# list
kubens
# select
kubens argocd
# previous
kubens -
brew update
brew install kube-ps1
vi ~/.zshrc
source "/usr/local/opt/kube-ps1/share/kube-ps1.sh"
PROMPT='$(kube_ps1)'$PROMPT
# on
kubeon
# off
kubeoff
brew install derailed/k9s/k9s
sudo su -
yum install zsh -y
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
cd ~/.oh-my-zsh/custom/plugins/
git clone https://github.com/zsh-users/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
cd
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
chmod +x ./kubectl
mv ./kubectl /usr/local/bin/kubectl
kubectl version --client
cd
git clone https://github.com/ahmetb/kubectx
mkdir -p ~/.local/bin
mv kubectx/kubectx ~/.local/bin/
mv kubectx/kubens ~/.local/bin/
rm -rf kubectx
cd
git clone https://github.com/jonmosco/kube-ps1.git
mv kube-ps1/kube-ps1.sh ~/.local/bin/
rm -rf kube-ps1
cd
mkdir k9s
cd k9s
wget https://github.com/derailed/k9s/releases/download/v0.25.7/k9s_Linux_x86_64.tar.gz
tar -zxvf k9s_Linux_x86_64.tar.gz
mv k9s ~/.local/bin
rm -rf ~/k9s
cd ~/.local/bin
chown root:root k9s
chmod +x kube-ps1.sh
plugins=(git zsh-syntax-highlighting zsh-autosuggestions kubectl kube-ps1) # add
# ํ๋กฌํํธ
NEWLINE=$'\n'
export PROMPT='[$FG[154]%T%{$reset_color%}][%{$fg[cyan]%}%m %{$reset_color%}%~] $(git_prompt_info)${NEWLINE}# '
export PATH=~/.local/bin/:$PATH
source <(kubectl completion zsh)
bindkey -v
source "/root/.local/bin/kube-ps1.sh"
PROMPT='$(kube_ps1)'$PROMPT
export KUBECONFIG=~/.kube/cluster1:~/.kube/cluster2