Orchestration

How to Install kubectl on Windows: Complete 2026 Guide

August 1, 2026 Kubezilla Team 2 min read

Why You Need kubectl on Windows

kubectl talks to the Kubernetes API server, letting you deploy applications, inspect resources, and manage your cluster’s state without needing a graphical dashboard. Whether you’re a developer testing locally with Minikube or an SRE managing production clusters, kubectl is essential tooling.

Method 1: Install kubectl Using Winget

Windows Package Manager (winget) ships with modern versions of Windows 10 and 11, making it the fastest install path.

  1. Open PowerShell as Administrator.
  2. Run winget install -e --id Kubernetes.kubectl
  3. Restart your terminal so the updated PATH takes effect.

Method 2: Install kubectl Using Chocolatey

If you already use Chocolatey for package management, this is a one-line install.

  1. Open an elevated PowerShell window.
  2. Run choco install kubernetes-cli
  3. Confirm the prompt to proceed with installation.

Method 3: Download the Binary Directly

For full control over versioning, download the executable straight from the official Kubernetes release servers.

  1. Open PowerShell and run curl.exe -LO "https://dl.k8s.io/release/v1.31.0/bin/windows/amd64/kubectl.exe"
  2. Move the file to a folder such as C:\kubectl\.
  3. Add that folder to your system PATH via System Properties → Environment Variables.

Verifying Your Installation

Run kubectl version --client to confirm the CLI is installed and check the version number. If you see a “command not found” error, your PATH variable likely wasn’t updated — close and reopen your terminal, or manually verify the folder path was added correctly.

Configuring kubectl to Connect to a Cluster

kubectl reads cluster connection details from a config file, usually located at %USERPROFILE%\.kube\config. If you’re using a managed service like AKS, EKS, or GKE, each provider offers a CLI command that automatically populates this file for you.

Common Windows-Specific Issues

Users on Windows sometimes run into path length limitations or antivirus software flagging the executable. Disabling real-time scanning temporarily during installation, or adding an exclusion for your kubectl directory, usually resolves this.

FAQ

Does kubectl work in both PowerShell and Command Prompt?
Yes, kubectl runs identically in both, though PowerShell offers better tab-completion support with a small configuration addition.

Can I use kubectl inside WSL2 instead?
Yes, and many developers prefer this since it mirrors Linux-based production environments more closely.

Conclusion

Installing kubectl on Windows only takes a few minutes regardless of which method you choose. Once it’s set up, you’re ready to connect to a cluster and start managing Kubernetes resources directly from your terminal.

Leave a comment