1、首先安装Chocolatey

参考:https://chocolatey.org/install#install-with-powershellexe

windows7+以上操作系统的cmd shell(必须Administrator用户)执行

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

  安装不报错就尝试执行choco ?,正常看到choco版本

2、利用choco安装kubectl

cmd下执行如下命令:

choco install kubernetes-cli

安装完成执行:

kubectl version

看到版本则成功。

 

 

Chocolatey是windows的包管理工具,有时间可以多研究研究。

 

相关文章:

  • 2021-05-02
  • 2021-11-08
  • 2021-07-09
  • 2022-01-10
  • 2021-08-14
  • 2021-11-04
  • 2021-05-28
  • 2021-10-29
猜你喜欢
  • 2021-07-19
  • 2021-10-26
  • 2021-07-13
  • 2022-02-09
  • 2022-02-27
  • 2022-02-24
  • 2022-12-23
相关资源
相似解决方案