Install Kubectl for Windows

Windows

Hi everyone, i will show you how to install kubectl for Windows using PowerShell in this article.

  • Open PowerShell as shown below.
cidokimi
  • Run these commands below.
#To set kubectl version
$VERSIONKCTL="v1.20.9"

curl -LO "https://dl.k8s.io/release/$VERSIONKCTL/bin/windows/amd64/kubectl.exe"

curl -LO "https://dl.k8s.io/$VERSIONKCTL/bin/windows/amd64/kubectl.exe.sha256"

CertUtil -hashfile kubectl.exe SHA256

type kubectl.exe.sha256

$($(CertUtil -hashfile .\kubectl.exe SHA256)[1] -replace " ", "") -eq $(type .\kubectl.exe.sha256)

###PATH###

kubectl version --client

I wish everyone an awesome day!

--

--

Çiğdem Kadakoğlu

Senior Cloud&DevOps Engineer | Instructor | Docker Captain | Azure Solutions Architect | CK{A|AD}-AZ{104|204|305|400|800|801|900}-DP900-AI{900|102}-PL900🐧🐳🌼☕