#以管理员身份运行cmd命令 @"%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" #以管理员身份运行powershell命令 Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
#choco安装成功以后powershell 运行kubectl安装命令
choco install kubernetes-cli
#在powershell输入配置命令
cd $HOME
mkdir .kube
#新建一个名称为config的文件 ,将服务端的cat /etc/kubernetes/admin.conf 内容拷贝到 $HOME/.kube/config;