Install Kubectl for Windows
Dec 16, 2021
Windows
Hi everyone, i will show you how to install kubectl for Windows using PowerShell in this article.
- Open PowerShell as shown below.
- 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!