Downgrade kubectl version to match minikube k8s version

前端 未结 3 578
轻奢々
轻奢々 2021-02-18 21:15

I started minikube with k8s version 1.5.2 and I would like to downgrade my kubectl so that it is also 1.5.2. Currently when I run kubectl version I get:

         


        
3条回答
  •  孤街浪徒
    2021-02-18 21:36

    You can just download the previous version binary and replace the one you have now.

    Linux:

    curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.5.2/bin/linux/amd64/kubectl
    chmod +x ./kubectl
    sudo mv ./kubectl /usr/local/bin/kubectl
    

    macOS:

    curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.5.2/bin/darwin/amd64/kubectl
    chmod +x ./kubectl
    sudo mv ./kubectl /usr/local/bin/kubectl
    

    Windows:

    curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.5.2/bin/windows/amd64/kubectl.exe
    

    And add it to PATH.

    If not follow instructions for other Operating Systems here: https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-binary-via-curl

提交回复
热议问题