kubectl Installation¶
This guide outlines the steps to install kubectl, the command-line tool for controlling Kubernetes clusters, on a Linux system (specifically Ubuntu). The process involves downloading the official binary, making it executable, and placing it in your system's path.
^[400-devops-06-kubernetes-minikube-01-install.md]
Prerequisites¶
Before installing kubectl, ensure your system is up to date and has necessary utilities like curl or wget installed^[400-devops-06-kubernetes-minikube-01-install.md].
sudo apt update -y
sudo apt upgrade -y
sudo apt install -y curl wget apt-transport-https
Installation Steps¶
1. Download the Binary¶
Download the latest stable release of kubectl using curl.^[400-devops-06-kubernetes-minikube-01-install.md]
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
2. Make Binary Executable¶
Grant execute permissions to the downloaded binary file^[400-devops-06-kubernetes-minikube-01-install.md].
chmod +x [kubectl](<./kubectl.md>)
3. Move to Path¶
Move the binary into a directory included in your system's PATH, such as /usr/local/bin/, to make it accessible system-wide^[400-devops-06-kubernetes-minikube-01-install.md].
sudo mv [kubectl](<./kubectl.md>) /usr/local/bin/
Verification¶
After installation, you can verify the version to ensure it is correctly installed^[400-devops-06-kubernetes-minikube-01-install.md].
[kubectl](<./kubectl.md>) version -o yaml
Related Concepts¶
Sources¶
400-devops-06-kubernetes-minikube-01-install.md