Skip to content

Instantly share code, notes, and snippets.

@khairulcs
Created May 25, 2021 13:16
Show Gist options
  • Save khairulcs/ae7d916e6602e257606336d0015fd68f to your computer and use it in GitHub Desktop.
Save khairulcs/ae7d916e6602e257606336d0015fd68f to your computer and use it in GitHub Desktop.
Installing kubectl client on Ubuntu
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256"
echo "$(<kubectl.sha256) kubectl" | sha256sum --check

Should echo kubectl: OK

sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
kubectl version --client

Should echo Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1", GitCommit:"5e58841cce77d4bc13713ad2b91fa0d961e69192", GitTreeState:"clean", BuildDate:"2021-05-12T14:18:45Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"linux/amd64"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment