How to upgrade kubectl client version

前端 未结 8 1305
滥情空心
滥情空心 2020-12-24 06:39

I want to upgrade the kubectl client version to 1.11.3.

I executed brew install kubernetes-cli but the version doesnt seem to be updating.



        
相关标签:
8条回答
  • 2020-12-24 06:43

    I landed here after I faced problem while downloading kubectl from aws. kubectl installation was failing because I had kubectl in my machine.

    After I removed, was able to install kubectl 1.15.11 from aws.

    lrwxr-xr-x  1 root      admin      55 Jan 11 17:49 kubectl.docker -> /Applications/Docker.app/Contents/Resources/bin/kubectl
    lrwxr-xr-x  1 root      admin      55 Jan 11 17:49 kubectl -> /Applications/Docker.app/Contents/Resources/bin/kubectl ```
    
    
    0 讨论(0)
  • 2020-12-24 06:47

    If you have installed it with brew, you can just run brew upgrade kubernetes-cli.

    0 讨论(0)
  • 2020-12-24 06:47

    To install OR upgrade the version of kubectl Server and Client on MacOS X is very easy if you follow the detailed install guide on the Kubernetes install page https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-on-macos

    Hope it helps :)

    0 讨论(0)
  • 2020-12-24 06:49

    Install specific version of kubectl

    curl -LO https://storage.googleapis.com/kubernetes-release/release/<specific-kubectl-version>/bin/darwin/amd64/kubectl

    For your case if you want to install version v1.11.3 then replace specific-kubectl-version with v1.11.3

    Then make this binary executable

    chmod +x ./kubectl
    

    Then move this binary to your PATH

    sudo mv ./kubectl $(which kubectl)
    
    0 讨论(0)
  • 2020-12-24 06:53

    My docker desktop used an old version of kubectl. After installing gcloud components install kubectl the installer yields a warning of the location of the outdated kubectl version:

    WARNING: There are older versions of Google Cloud Platform tools on your system PATH. Please remove the following to avoid accidentally invoking these old tools:

    /Applications/Docker.app/Contents/Resources/bin/kubectl

    I have removed the folder and kubectl run fine.

    0 讨论(0)
  • 2020-12-24 06:54

    I had installed kubectl using google-cloud-sdk. So in my path kubectl was pointing to this location. That is why the version did not update. Kubectl got updated after I removed that from the path.

    0 讨论(0)
提交回复
热议问题