Skip to main content

Install and Set Up kubectl with Chocolatey on Windows

1. Install kubectl

    choco install kubernetes-cli

2. Test to ensure the version you installed is up-to-date

    kubectl version --client

3. Navigate to your home directory

    # If you're using cmd.exe, run: cd %USERPROFILE%
cd ~

4. Create the .kube directory

    mkdir .kube

5. Change to the .kube directory you just created

    cd .kube

6. Configure kubectl to use a remote Kubernetes cluster

    New-Item config -type file 

Reference:

https://kubernetes.io/docs/tasks/tools/