Install kubectl on Ubuntu 22.04 using bash
Some helpful commands to install the kubectl the Kubernetes tool to help you manager your Kubernetes cluster.
Getting started with Kubernetes you will need kubectl
command line tool.
1. Install kubectl binary
This command will bring down the latest version.
If you want a specific version do:
Validate the binary
You should validate your download by using the checksum file, get it here:
Validate the kubectl binary agains the checksum file:
If ok it should output:
kubectl: OK
If it failed for some reason sha256
exits with nonzero status and outputs:
kubectl: FAILED sha256sum: WARNING: 1 computed checksum did NOT match
Check you URL and try again.
3. Finally Install kubectl
Command downloads the binary to you local bin to a folder called kubectl
with the required permissions.
Chmod owner
✅ Owner can read
✅ Owner can write
✅ Owner can execute
Chmod group
✅ Group can read
❌ Group can't write
✅ Group can execute
Chmod other
✅ Others can read
❌ Others can't write
❌ Others can execute
4. Check to ensure all went well
outputs: