Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
需要用admin权限打开powershell,运行这个命令。
这个命令做了几件事情:
Set-ExecutionPolicy Bypass -Scope Process -Force:暂时绕过执行策略,允许运行脚本。
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072:设置安全协议,确保使用TLS 1.2进行通信。
iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1’)):下载Chocolatey的安装脚本并执行。
安装helm
choco install kubernetes-helm