2024-01-27 19:33:25 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2024-01-27 19:52:52 +02:00
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2024-01-27 19:33:25 +02:00
|
|
|
apt install -y apt-transport-https ca-certificates curl wget
|
|
|
|
|
|
|
|
mkdir -p bin
|
|
|
|
|
|
|
|
wget "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
|
|
|
|
-O ./bin/kubectl
|
|
|
|
|
|
|
|
wget "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256" \
|
|
|
|
-O ./bin/kubectl.sha256
|
|
|
|
|
|
|
|
echo "$(cat ./bin/kubectl.sha256) ./bin/kubectl" | sha256sum --check
|
|
|
|
|
|
|
|
install -o root -g root -m 0755 ./bin/kubectl /usr/local/bin/kubectl
|
|
|
|
|
|
|
|
kubectl version --client
|
|
|
|
|
|
|
|
|
|
|
|
wget "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl-convert" \
|
|
|
|
-O ./bin/kubectl-convert
|
|
|
|
|
|
|
|
wget "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl-convert.sha256" \
|
|
|
|
-O ./bin/kubectl-convert.sha256
|
|
|
|
|
|
|
|
echo "$(cat ./bin/kubectl-convert.sha256) ./bin/kubectl-convert" | sha256sum --check
|
|
|
|
|
|
|
|
|
|
|
|
install -o root -g root -m 0755 ./bin/kubectl-convert /usr/local/bin/kubectl-convert
|