-
Notifications
You must be signed in to change notification settings - Fork 1
/
krew.sh
executable file
·51 lines (46 loc) · 987 Bytes
/
krew.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
set -eo pipefail
KREW_VERSION=${KREW_VERSION:-v0.4.4}
(
set -x; cd "$(mktemp -d)" &&
OS="$(uname | tr '[:upper:]' '[:lower:]')" &&
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" &&
KREW="krew-${OS}_${ARCH}" &&
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/download/${KREW_VERSION}/${KREW}.tar.gz" &&
tar zxvf "${KREW}.tar.gz" &&
./"${KREW}" install krew
)
# TODO user: add this to Your .bashrc/.zshrc
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
kubectl krew update
KREW_PLUGINS=(
"access-matrix"
"browse-pvc"
"ca-cert"
"cert-manager"
"cilium"
"cnpg"
"cond"
"ctx"
"df-pv"
"explore"
"foreach"
"get-all"
"ktop"
"minio"
"neat"
"node-shell"
"ns"
"popeye"
"pv-migrate"
"resource-capacity"
"rook-ceph"
"tmux-exec"
"tree"
"view-cert"
"view-secret"
"volsync"
)
for PLUGIN in "${KREW_PLUGINS[@]}"; do
kubectl krew install "$PLUGIN"
done