blob: 8d1229b527fc425dc17663f90bcc1b1716690b7c [file] [log] [blame]
Areli Fuss471a29702018-02-01 13:09:07 +02001#!/bin/sh
2
3kubectl_version=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)
4
5echo "[INFO] kubectl version - ${kubectl_version}"
6
7curl_status=$(curl -w '%{http_code}\n' -LO https://storage.googleapis.com/kubernetes-release/release/${kubectl_version}/bin/linux/amd64/kubectl)
8
9if [ $curl_status != 200 ] ; then
10 echo "[ERROR] Download kubectl failed - $curl_status"
11 exit -1
12fi
13
14chmod +x ./kubectl
15
16sudo mv ./kubectl /usr/local/bin/kubectl
17
18echo "source <(kubectl completion bash)" >> ~/.bashrc
19