-
Notifications
You must be signed in to change notification settings - Fork 5.4k
/
install-k8s-tools.sh
30 lines (25 loc) · 1.06 KB
/
install-k8s-tools.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
#!/usr/bin/env bash
set -euo pipefail
if [[ ! -f /usr/local/bin/kind ]]; then
echo "--- Installing kind"
curl -sfL "https://github.com/kubernetes-sigs/kind/releases/download/v0.22.0/kind-linux-amd64" -o /usr/local/bin/kind
chmod +x /usr/local/bin/kind
kind --help
fi
if [[ ! -f /usr/local/bin/kubectl ]]; then
echo "--- Installing kubectl"
curl -sfL "https://dl.k8s.io/release/v1.28.4/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl
chmod +x /usr/local/bin/kubectl
kubectl version --client
fi
if [[ ! -f /usr/local/bin/kustomize ]]; then
echo "--- Installing kustomize"
curl -sfL "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv5.2.1/kustomize_v5.2.1_linux_amd64.tar.gz" \
| tar -xzf - -C /usr/local/bin kustomize
fi
if [[ ! -d /usr/local/helm ]]; then
echo "--- Installing helm"
mkdir -p /usr/local/helm
curl -sfL "https://get.helm.sh/helm-v3.12.2-linux-amd64.tar.gz" | tar -xzf - -C /usr/local/helm linux-amd64/helm
ln -s /usr/local/helm/linux-amd64/helm /usr/local/bin/helm
fi