Merge pull request #38939 from windsonsea/podread
[zh] sync install-kubectl-windows.mdpull/38960/head
commit
c7fb1410bc
|
@ -41,10 +41,10 @@ The following methods exist for installing kubectl on Windows:
|
|||
|
||||
<!--
|
||||
- [Install kubectl binary with curl on Windows](#install-kubectl-binary-with-curl-on-windows)
|
||||
- [Install on Windows using Chocolatey, Scoop, or Winget](#install-nonstandard-package-tools)
|
||||
-->
|
||||
- [Install on Windows using Chocolatey, Scoop, or winget](#install-nonstandard-package-tools)
|
||||
-->
|
||||
- [用 curl 在 Windows 上安装 kubectl](#install-kubectl-binary-with-curl-on-windows)
|
||||
- [在 Windows 上用 Chocolatey、Scoop 或 Winget 安装](#install-nonstandard-package-tools)
|
||||
- [在 Windows 上用 Chocolatey、Scoop 或 winget 安装](#install-nonstandard-package-tools)
|
||||
|
||||
<!--
|
||||
### Install kubectl binary with curl on Windows
|
||||
|
@ -54,7 +54,7 @@ The following methods exist for installing kubectl on Windows:
|
|||
<!--
|
||||
1. Download the [latest release {{< param "fullversion" >}}](https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/windows/amd64/kubectl.exe).
|
||||
-->
|
||||
1. 下载 [最新发行版 {{< param "fullversion" >}}](https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/windows/amd64/kubectl.exe)。
|
||||
1. 下载[最新发行版 {{< param "fullversion" >}}](https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/windows/amd64/kubectl.exe)。
|
||||
|
||||
<!--
|
||||
Or if you have `curl` installed, use this command:
|
||||
|
@ -106,7 +106,7 @@ The following methods exist for installing kubectl on Windows:
|
|||
- 用 PowerShell 自动验证,用运算符 `-eq` 来直接取得 `True` 或 `False` 的结果:
|
||||
|
||||
```powershell
|
||||
$($(CertUtil -hashfile .\kubectl.exe SHA256)[1] -replace " ", "") -eq $(type .\kubectl.exe.sha256)
|
||||
$(Get-FileHash -Algorithm SHA256 .\kubectl.exe).Hash -eq $(Get-Content .\kubectl.exe.sha256)
|
||||
```
|
||||
|
||||
<!--
|
||||
|
@ -123,6 +123,9 @@ The following methods exist for installing kubectl on Windows:
|
|||
kubectl version --client
|
||||
```
|
||||
|
||||
<!--
|
||||
Or use this for detailed view of version:
|
||||
-->
|
||||
或者使用下面命令来查看版本的详细信息:
|
||||
|
||||
```cmd
|
||||
|
@ -134,22 +137,22 @@ The following methods exist for installing kubectl on Windows:
|
|||
[Docker Desktop for Windows](https://docs.docker.com/docker-for-windows/#kubernetes) adds its own version of `kubectl` to `PATH`.
|
||||
If you have installed Docker Desktop before, you may need to place your `PATH` entry before the one added by the Docker Desktop installer or remove the Docker Desktop's `kubectl`.
|
||||
-->
|
||||
[Windows 版的 Docker Desktop](https://docs.docker.com/docker-for-windows/#kubernetes)
|
||||
[Windows 版的 Docker Desktop](https://docs.docker.com/docker-for-windows/#kubernetes)
|
||||
将其自带版本的 `kubectl` 添加到 `PATH`。
|
||||
如果你之前安装过 Docker Desktop,可能需要把此 `PATH` 条目置于 Docker Desktop 安装的条目之前,
|
||||
或者直接删掉 Docker Desktop 的 `kubectl`。
|
||||
{{< /note >}}
|
||||
|
||||
<!--
|
||||
### Install on Windows using Chocolatey, Scoop, or Winget {#install-nonstandard-package-tools}
|
||||
### Install on Windows using Chocolatey, Scoop, or winget {#install-nonstandard-package-tools}
|
||||
-->
|
||||
### 在 Windows 上用 Chocolatey、Scoop 或 Winget 安装 {#install-nonstandard-package-tools}
|
||||
### 在 Windows 上用 Chocolatey、Scoop 或 winget 安装 {#install-nonstandard-package-tools}
|
||||
|
||||
<!--
|
||||
1. To install kubectl on Windows you can use either [Chocolatey](https://chocolatey.org) package manager, [Scoop](https://scoop.sh) command-line installer, or [Winget](https://winget.run/) package manager.
|
||||
1. To install kubectl on Windows you can use either [Chocolatey](https://chocolatey.org) package manager, [Scoop](https://scoop.sh) command-line installer, or [winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/) package manager.
|
||||
-->
|
||||
1. 要在 Windows 上安装 kubectl,你可以使用包管理器 [Chocolatey](https://chocolatey.org)、
|
||||
命令行安装器 [Scoop](https://scoop.sh) 或包管理器 [Winget](https://winget.run/)。
|
||||
命令行安装器 [Scoop](https://scoop.sh) 或包管理器 [winget](https://learn.microsoft.com/zh-cn/windows/package-manager/winget/)。
|
||||
|
||||
{{< tabs name="kubectl_win_install" >}}
|
||||
{{% tab name="choco" %}}
|
||||
|
@ -180,7 +183,7 @@ If you have installed Docker Desktop before, you may need to place your `PATH` e
|
|||
|
||||
<!--
|
||||
1. Navigate to your home directory:
|
||||
-->
|
||||
-->
|
||||
3. 导航到你的 home 目录:
|
||||
|
||||
```powershell
|
||||
|
@ -190,7 +193,7 @@ If you have installed Docker Desktop before, you may need to place your `PATH` e
|
|||
|
||||
<!--
|
||||
1. Create the `.kube` directory:
|
||||
-->
|
||||
-->
|
||||
4. 创建目录 `.kube`:
|
||||
|
||||
```powershell
|
||||
|
@ -266,9 +269,9 @@ kubectl 为 Bash、Zsh、Fish 和 PowerShell 提供自动补全功能,可以
|
|||
```
|
||||
|
||||
<!--
|
||||
1. Validate the binary (optional)
|
||||
1. Validate the binary (optional).
|
||||
-->
|
||||
2. 验证该可执行文件(可选步骤)
|
||||
2. 验证该可执行文件(可选步骤)。
|
||||
|
||||
<!--
|
||||
Download the `kubectl-convert` checksum file:
|
||||
|
@ -307,7 +310,7 @@ kubectl 为 Bash、Zsh、Fish 和 PowerShell 提供自动补全功能,可以
|
|||
<!--
|
||||
1. Append or prepend the `kubectl-convert` binary folder to your `PATH` environment variable.
|
||||
|
||||
1. Verify plugin is successfully installed
|
||||
1. Verify the plugin is successfully installed.
|
||||
-->
|
||||
3. 将 `kubectl-convert` 二进制文件夹附加或添加到你的 `PATH` 环境变量中。
|
||||
|
||||
|
|
Loading…
Reference in New Issue