Install kubectl using “choco install”

Kubernetes is a free, open-source, and well-known container orchestration system used to automate the deployment, scaling, and management of applications and software. The developer can execute multi-container applications inside the cluster. Kubernetes cluster is further composed of various components and resources such as kubelets, nodes, pods, control plane, controllers, etc. To manage and operate these components, the kubectl tool is essential.

This blog will clarify:

What is kubectl?

,kubectl” is the command line tool of Kubernetes that is used to deploy, monitor, and manage containerized applications inside the cluster. It is used to deploy, operate, and inspect Kubernetes resources by offering a variety of kubectl commands. Users can “easily communicate with Kubernetes components through, direct, scale, and monitor applications.”kubectl” Permission.

Prerequisite: Install Chocolatey on Windows

Chocolatey is an open-source free Microsoft machine-level package manager. It is used to install and upgrade software, applications, and packages. To install Chocolatey on Windows, follow the following instructions.

Step 1: Launch Powershell

First, launch PowerShell with administrator rights:

Step 2: Get the Execution Policy

To get the current execution policy of PowerShell, use the command below. By default, its value is “forbidden,

If its status is “forbiddenAs shown below, the user needs to change it to “all signed” Policy:

Step 3: Set Execution Policy

Use the given command to change the execution policy. This step is required to run a script in Windows PowerShell:

Set ExecutionPolicy byway -scope Process

Step 4: Install Chocolatey Package Manager

Now, install Chocolatey by executing the following commands in Powershell:

Set ExecutionPolicy byway -scope Process -Force, [System.Net.ServicePointManager]::Security Protocol , [System.Net.ServicePointManager]::Security Protocol -bore 3072, Nothing ,,new item System.Net.WebClient,Download .string,'',,

After installation, ” RunChocoRun the command to verify if a package is installed:

The output shows that we have installed Chocolatey effectively.v2.2.2On Windows:

How to install kubectl using “choco install”?

Choco Package Manager offers many packages and is supported by hundreds of companies. It also allows us to play with Kubernetes and its components throughkubernetes-cli” packets. To install the Kubectl Kubernetes command line tool, use the instructions below.

Step 1: Install kubectl

To install kubectl using Chocolatey, use the command below:

Choco Install Kubernetes,CLI

Step 2: Verification

After installing kubectl CLI, check kubectl version:

The output shows that we have successfully installed kubectl.v1.29.0On Windows:

Step 3: Perform additional configuration

To configure and use a remote Kubernetes cluster, first, go to the Windows home directory which is “C:\Users\<उपयोगकर्ता-नाम>,

“Create a new directory named.Happen,

Configure a remote Kubernetes cluster by creating a config file. This file can be edited and opened in any text editor:

new item config ,Type file

Step 4: Start the Minikube Cluster

To use kubectl to manage and control a Kubernetes cluster, first start the cluster using the minikube tool. To start understanding Kubernetes and setting up Minikube, follow our Linked article. To start a minikube Kubernetes cluster, use “minikube start” Permission:

Step 5: Use kubectl commands

After starting the cluster, the user can get cluster information through “kubectl cluster-info” Permission:

That's all about installing Kubectl using “install choco” Permission.


“use” to install kubectlinstall choco“Command, First of all, install Chocolatey Windows Package Manager on the system. After that, run “choco install kubernetes-cli“The command to install kubectl. To verify, start a Kubernetes cluster using the minikube tool and use “kubectl cluster-info” Command. We have covered the installation method of kubectl using Chocolatey.

Add comment

By Ranjan