Kubectl Installation and Cluster Access Verification on Windows
February 3, 2025
Tags:
·
·
·
·
·
Create an Utho account to try this guide with a $100 credit.
Sign Up
Kubectl Installation and Cluster Access Verification on Windows
Step 1: Download and Install kubectl
- Open PowerShell or Command Prompt.
Run the following command to download the kubectl binary:
curl.exe -LO "https://dl.k8s.io/release/v1.32.0/bin/windows/amd64/kubectl.exe"
Step 2: Verify kubectl Installation
Verify that kubectl is installed by running:
kubectl version --client
- This should display the client version of kubectl.
Step 3: Place kubeconfig File
Locate your kubeconfig file (e.g., kubeconfig.yaml).
Place the file in the .kube directory on your system.
- Example path: C:\path\to\your\kubeconfig
Step 4: Set KUBECONFIG Environment Variable
- Open PowerShell.
Set the kubeconfig file as an environment variable by running:
$env:KUBECONFIG = "C:\\path\\to\\your\\kubeconfig\"
Step 5: Verify Access to the Kubernetes Cluster
Verify access to the cluster using:
kubectl get nodes
- This should display the nodes in your Kubernetes cluster.
Notes
Ensure that your kubeconfig file contains the correct cluster credentials and configurations.
If any issues arise, confirm that the cluster is reachable from your machine.
Thank You!
Create an Utho account to try this guide with a $100 credit.
Sign Up