kubectl工具的windows安装方法

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的包管理工具,有时间可以多研究研究。

 

posted @ 2018-06-10 18:54  初级编程  阅读(1561)  评论(0编辑  收藏  举报