Created
September 3, 2022 06:56
-
-
Save v0lkan/5da4bc653bc31bd3a7105b878328d304 to your computer and use it in GitHub Desktop.
Install `kubectl` to Amazon EC2 Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Get the latest kubectl version: | |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | |
# 2. Get checksum | |
curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256" | |
# 3. Validate | |
echo "$(<kubectl.sha256) kubectl" | sha256sum --check | |
# should output: “kubectl: OK” | |
# 4. Insall | |
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl | |
# 5. Verify | |
kubectl version --client --output=yaml | |
# clientVersion: | |
# buildDate: "2022-08-23T17:44:59Z" | |
# compiler: gc | |
# … etc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment