DEV Community

Cover image for πŸ› οΈ DevOps Made Easy: Install AWS CLI, kubectl & eksctl Using Chocolatey 🎯

πŸ› οΈ DevOps Made Easy: Install AWS CLI, kubectl & eksctl Using Chocolatey 🎯

Important Note: This Installation is specifically for Windows OS.

πŸ‘‹ Hey there! I’m Sarvar, a Cloud Architect passionate about cutting-edge technologies. With years of experience in Cloud Operations (Azure and AWS), Data Operations, Data Analytics, and DevOps, I've had the privilege of working with clients around the globe, delivering top-notch results. I’m always exploring the latest tech trends and love sharing what I learn along the way. Let’s dive into the world of cloud and tech together! πŸš€

What is Chocolatey?

Chocolatey is a robust Windows package manager that makes program administration, updates, and installation easier with the command line. With just one command, it streamlines the download, installation, and configuration of software, making packages like Docker, Node.js, and Git simple to manage. Like apt for Linux or Homebrew for macOS, Chocolatey is popular in development and IT environments. It is particularly helpful for automating software installations, managing updates, and guaranteeing consistency across computers. Because users may script and automate their program setup, it saves time and effort.

In this article, I will show you how to use PowerShell to install Chocolatey, the powerful Windows package manager. After setting up Chocolatey, we'll walk you through the quick installation of the most important developer tools: the Kubernetes CLI (kubectl) for dealing with Kubernetes clusters, the Amazon EKS CLI (eksctl) for managing Kubernetes clusters on AWS, and the AWS Command Line Interface (AWS CLI) for controlling AWS services.

By the time you finish reading this article, you'll have these tools installed and be prepared to use Chocolatey to automate your cloud and DevOps workflows with just a few quick commands.

Now let's get going!


1. Installing Chocolatey using PowerShell

Software installations are effortless with Chocolatey, especially for developers. Here's how to use PowerShell to install Chocolatey.

Step 1: Open PowerShell as Administrator

Before proceeding, ensure you’re running PowerShell with Administrator privileges. To do this:

  • Search for "PowerShell" in the Start menu, right-click it, and select Run as Administrator.

Image description

Step 2: Install Chocolatey

Once PowerShell is running as Administrator, run the following command to install Chocolatey:

Set-ExecutionPolicy Bypass -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol =
[System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Enter fullscreen mode Exit fullscreen mode

This command temporarily bypasses the PowerShell execution policy and runs the installation script for Chocolatey.

Step 3: Verify Chocolatey Installation

Once the installation completes, you can verify that Chocolatey was installed successfully by running:

choco -v
Enter fullscreen mode Exit fullscreen mode

This command should return the version of Chocolatey, indicating that the installation was successful, as shown below.

Image description


2. Installing AWS CLI, kubectl, and eksctl Using Chocolatey

Now that Chocolatey is installed, we can easily install the AWS CLI, kubectl, and eksctl. These tools are essential for managing AWS resources and Kubernetes clusters.

Step 2.1 Installing AWS CLI

The AWS CLI (Command Line Interface) allows you to interact with AWS services directly from the command line.

To install the AWS CLI using Chocolatey, run:

choco install awscli -y
Enter fullscreen mode Exit fullscreen mode

In PowerShell, run this command to import the Chocolatey helper module:

Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
Enter fullscreen mode Exit fullscreen mode

After importing the module, you can then run:

refreshenv
Enter fullscreen mode Exit fullscreen mode

This should refresh the environment variables without needing to restart PowerShell. Once the installation is complete, you can verify it by running:

aws --version
Enter fullscreen mode Exit fullscreen mode

This should return the AWS CLI version installed on your system as shown below.

Image description


Step 2.2 Installing Kubernetes CLI (kubectl)

kubectl is a command-line tool used to interact with Kubernetes clusters, helping manage cluster resources and deployments.

Install kubectl using Chocolatey with the following command:

choco install kubernetes-cli -y
Enter fullscreen mode Exit fullscreen mode

After the installation finishes, verify it by running:

kubectl version --client
Enter fullscreen mode Exit fullscreen mode

This command will output the kubectl client version, confirming a successful installation as shown below.

Image description


Step 2.3 Installing Amazon EKS CLI (eksctl)

eksctl is a command-line tool that simplifies the process of creating and managing Kubernetes clusters on Amazon EKS.

To install eksctl, run the following Chocolatey command:

choco install eksctl -y
Enter fullscreen mode Exit fullscreen mode

Once installed, confirm the installation by checking the version:

eksctl version
Enter fullscreen mode Exit fullscreen mode

You should see the version of eksctl installed on your system as shown below.

Image description


Conclusion: For developers, IT specialists, and everyone else wishing to simplify Windows program management, Chocolatey is an essential tool. By converting difficult tasks like manually installing software into short, recurring activities, it makes it easier for you to automate and script your workflows. Try Chocolatey if you haven't already β€” it's a great way to manage your software if you use Windows!


Here is the End!

✨ Thank you for reading! ✨ I hope this article helped simplify the process and gave you valuable insights. As I continue to explore the ever-evolving world of technology, I’m excited to share more guides, tips, and updates with you. πŸš€ Stay tuned for more content that breaks down complex concepts and makes them easier to grasp. Let’s keep learning and growing together! πŸ’‘

Top comments (0)