What are kubectl and eksctl?
kubectl: Kubernetes Command-Line Tool (kubectl) is a powerful utility that allows users to interact with Kubernetes clusters. It enables you to deploy applications, inspect and manage cluster resources, and troubleshoot issues efficiently.
eksctl: eksctl is a simple command-line utility for creating, managing, and operating Amazon EKS clusters. It simplifies the process of provisioning EKS clusters, managing node groups, and performing other cluster-related tasks.
Installation Guide
1. Installing kubectl
Linux:
You can download the latest release of kubectl with the below command
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
But, in case you wish to download a specific version then just replace the “$(curl -L -s https://dl.k8s.io/release/stable.txt)” part of the above comamnd with the specific version that you wish to install. For example, if you wish to download version 1.29 then your command should look something as below:
curl -LO https://dl.k8s.io/release/v1.29/bin/linux/amd64/kubectl
To install it now run the following command:
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
To verify if the kubectl has been installed successfully, run the below command
kubectl version --client
The above command will display the version of kubectl. If you see it then congratulation, you have successfully installed kubectl.
macOS (using Homebrew):
brew install kubectl
Windows:
- Download the latest version of kubectl from the official Kubernetes GitHub repository: kubectl Releases
- Add the downloaded executable to your PATH environment variable.
- Or run the below command:
- curl.exe -LO “https://dl.k8s.io/release/v1.29.2/bin/windows/amd64/kubectl.exe”
2. Installing eksctl
Linux:
# for ARM systems, set ARCH to: `arm64`, `armv6` or `armv7`
ARCH=amd64
PLATFORM=$(uname -s)_$ARCH
curl -sLO "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_$PLATFORM.tar.gz"
# (Optional) Verify checksum
curl -sL "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_checksums.txt" | grep $PLATFORM | sha256sum --check
tar -xzf eksctl_$PLATFORM.tar.gz -C /tmp && rm eksctl_$PLATFORM.tar.gz
sudo mv /tmp/eksctl /usr/local/bin
macOS:
brew tap weaveworks/tap
brew install weaveworks/tap/eksctl
Windows:
Direct Download Link https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_windows_amd64.zip
Verifying eksctl Installations
you can verify eksctl installations by running the following command:
eksctl version
The above command should return the eksctl version.
Conclusion
Congratulations! You’ve successfully installed kubectl and eksctl on your preferred operating system. With these powerful tools at your disposal, you’re ready to dive into Kubernetes and Amazon EKS management with confidence. Stay tuned for more tips and tutorials on cloud-native technologies. Happy Kubernetizing!
In this guide, we’ve covered the installation process for kubectl and eksctl on various operating systems. Whether you’re running Linux, macOS, or Windows, you can now seamlessly set up these essential tools for Kubernetes and Amazon EKS management. Happy clustering!