Created
January 20, 2020 03:41
-
-
Save jonmoter/0d384bd9044d950d0351aaba10227588 to your computer and use it in GitHub Desktop.
script to install krew and some plugins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# https://github.com/kubernetes-sigs/krew/ | |
set -ex | |
krew_version=v0.2.1 | |
if [ -d $HOME/.krew ] ; then | |
echo "krew already installed" | |
else | |
cd "$(mktemp -d)" | |
curl -fsSLO "https://storage.googleapis.com/krew/${krew_version}/krew.{tar.gz,yaml}" | |
tar zxvf krew.tar.gz | |
krew_binary="./krew_$(uname | tr '[:upper:]' '[:lower:]')_amd64" | |
${krew_binary} install --manifest=krew.yaml --archive=krew.tar.gz | |
fi | |
plugin_list=" | |
access-matrix | |
sniff | |
tree | |
who-can | |
" | |
for plugin in $plugin_list ; do | |
kubectl krew install "$plugin" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment