[Rancher] kubectl 윈도우 설치
설치
https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/
Install kubectl binary with curl on Windows Download the latest 1.28 patch release: kubectl 1.28.3.
Or if you have curl installed, use this command:
curl.exe -LO "https://dl.k8s.io/release/v1.28.3/bin/windows/amd64/kubectl.exe" Note: To find out the latest stable version (for example, for scripting), take a look at https://dl.k8s.io/release/stable.txt. Validate the binary (optional)
Download the kubectl checksum file:
curl.exe -LO "https://dl.k8s.io/v1.28.3/bin/windows/amd64/kubectl.exe.sha256" Validate the kubectl binary against the checksum file:
Using Command Prompt to manually compare CertUtil's output to the checksum file downloaded:
CertUtil -hashfile kubectl.exe SHA256 type kubectl.exe.sha256 Using PowerShell to automate the verification using the -eq operator to get a True or False result:
$(Get-FileHash -Algorithm SHA256 .\kubectl.exe).Hash -eq $(Get-Content .\kubectl.exe.sha256) Append or prepend the kubectl binary folder to your PATH environment variable.
Test to ensure the version of kubectl is the same as downloaded:
kubectl version --client Or use this for detailed view of version:
kubectl version --client --output=yaml alias