gitlab-build-images/scripts/install-kubectl
Kamil Trzciński 384f6231b4 Update scripts to compile arm64 based images
This changes all binaries to be platform dependent
instead of being amd64 hardcoded.
2022-05-02 17:20:44 +02:00

13 lines
360 B
Bash
Executable file

#!/bin/bash
set -xeou pipefail
KUBECTL_VERSION=${1}
KUBECTL_DOWNLOAD_SHA256=${2}
KUBECTL_DOWNLOAD_URL="https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/$(dpkg --print-architecture)/kubectl"
curl -fsSL "${KUBECTL_DOWNLOAD_URL}" -o kubectl
echo "${KUBECTL_DOWNLOAD_SHA256} kubectl" | sha256sum -c -
chmod +x kubectl
mv kubectl /usr/local/bin/kubectl