diff --git a/images/linux/scripts/installers/kubernetes-tools.sh b/images/linux/scripts/installers/kubernetes-tools.sh index 6bafaab5f6a4..a32e7ea57efb 100644 --- a/images/linux/scripts/installers/kubernetes-tools.sh +++ b/images/linux/scripts/installers/kubernetes-tools.sh @@ -10,13 +10,9 @@ curl -L -o /usr/local/bin/kind $URL chmod +x /usr/local/bin/kind ## Install kubectl -curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - -touch /etc/apt/sources.list.d/kubernetes.list - -# Based on https://kubernetes.io/docs/tasks/tools/install-kubectl/, package is xenial for both OS versions. -echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list -apt-get update -apt-get install -y kubectl +KUBECTL_VERSION=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt) +curl -o /usr/local/bin/kubectl -LO https://storage.googleapis.com/kubernetes-release/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl +chmod +x /usr/local/bin/kubectl # Install Helm curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash