Skip to content

Commit f323e06

Browse files
committed
[zh] sync install-kubectl-windows.md
1 parent 689adf2 commit f323e06

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

content/zh-cn/docs/tasks/tools/install-kubectl-windows.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ The following methods exist for installing kubectl on Windows:
4141

4242
<!--
4343
- [Install kubectl binary with curl on Windows](#install-kubectl-binary-with-curl-on-windows)
44-
- [Install on Windows using Chocolatey, Scoop, or Winget](#install-nonstandard-package-tools)
45-
-->
44+
- [Install on Windows using Chocolatey, Scoop, or winget](#install-nonstandard-package-tools)
45+
-->
4646
- [用 curl 在 Windows 上安装 kubectl](#install-kubectl-binary-with-curl-on-windows)
47-
- [在 Windows 上用 Chocolatey、Scoop 或 Winget 安装](#install-nonstandard-package-tools)
47+
- [在 Windows 上用 Chocolatey、Scoop 或 winget 安装](#install-nonstandard-package-tools)
4848

4949
<!--
5050
### Install kubectl binary with curl on Windows
@@ -54,7 +54,7 @@ The following methods exist for installing kubectl on Windows:
5454
<!--
5555
1. Download the [latest release {{< param "fullversion" >}}](https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/windows/amd64/kubectl.exe).
5656
-->
57-
1. 下载 [最新发行版 {{< param "fullversion" >}}](https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/windows/amd64/kubectl.exe)。
57+
1. 下载[最新发行版 {{< param "fullversion" >}}](https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/windows/amd64/kubectl.exe)。
5858

5959
<!--
6060
Or if you have `curl` installed, use this command:
@@ -106,7 +106,7 @@ The following methods exist for installing kubectl on Windows:
106106
- 用 PowerShell 自动验证,用运算符 `-eq` 来直接取得 `True` 或 `False` 的结果:
107107
108108
```powershell
109-
$($(CertUtil -hashfile .\kubectl.exe SHA256)[1] -replace " ", "") -eq $(type .\kubectl.exe.sha256)
109+
$(Get-FileHash -Algorithm SHA256 .\kubectl.exe).Hash -eq $(Get-Content .\kubectl.exe.sha256)
110110
```
111111
112112
<!--
@@ -123,6 +123,9 @@ The following methods exist for installing kubectl on Windows:
123123
kubectl version --client
124124
```
125125

126+
<!--
127+
Or use this for detailed view of version:
128+
-->
126129
或者使用下面命令来查看版本的详细信息:
127130

128131
```cmd
@@ -134,22 +137,22 @@ The following methods exist for installing kubectl on Windows:
134137
[Docker Desktop for Windows](https://docs.docker.com/docker-for-windows/#kubernetes) adds its own version of `kubectl` to `PATH`.
135138
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`.
136139
-->
137-
[Windows 版的 Docker Desktop](https://docs.docker.com/docker-for-windows/#kubernetes)
140+
[Windows 版的 Docker Desktop](https://docs.docker.com/docker-for-windows/#kubernetes)
138141
将其自带版本的 `kubectl` 添加到 `PATH`
139142
如果你之前安装过 Docker Desktop,可能需要把此 `PATH` 条目置于 Docker Desktop 安装的条目之前,
140143
或者直接删掉 Docker Desktop 的 `kubectl`
141144
{{< /note >}}
142145

143146
<!--
144-
### Install on Windows using Chocolatey, Scoop, or Winget {#install-nonstandard-package-tools}
147+
### Install on Windows using Chocolatey, Scoop, or winget {#install-nonstandard-package-tools}
145148
-->
146-
### 在 Windows 上用 Chocolatey、Scoop 或 Winget 安装 {#install-nonstandard-package-tools}
149+
### 在 Windows 上用 Chocolatey、Scoop 或 winget 安装 {#install-nonstandard-package-tools}
147150

148151
<!--
149-
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.
152+
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.
150153
-->
151154
1. 要在 Windows 上安装 kubectl,你可以使用包管理器 [Chocolatey](https://chocolatey.org)
152-
命令行安装器 [Scoop](https://scoop.sh) 或包管理器 [Winget](https://winget.run/)
155+
命令行安装器 [Scoop](https://scoop.sh) 或包管理器 [winget](https://learn.microsoft.com/zh-cn/windows/package-manager/winget/)
153156

154157
{{< tabs name="kubectl_win_install" >}}
155158
{{% tab name="choco" %}}
@@ -180,7 +183,7 @@ If you have installed Docker Desktop before, you may need to place your `PATH` e
180183

181184
<!--
182185
1. Navigate to your home directory:
183-
-->
186+
-->
184187
3. 导航到你的 home 目录:
185188

186189
```powershell
@@ -190,7 +193,7 @@ If you have installed Docker Desktop before, you may need to place your `PATH` e
190193

191194
<!--
192195
1. Create the `.kube` directory:
193-
-->
196+
-->
194197
4. 创建目录 `.kube`
195198

196199
```powershell
@@ -266,9 +269,9 @@ kubectl 为 Bash、Zsh、Fish 和 PowerShell 提供自动补全功能,可以
266269
```
267270

268271
<!--
269-
1. Validate the binary (optional)
272+
1. Validate the binary (optional).
270273
-->
271-
2. 验证该可执行文件(可选步骤)
274+
2. 验证该可执行文件(可选步骤)
272275

273276
<!--
274277
Download the `kubectl-convert` checksum file:
@@ -307,7 +310,7 @@ kubectl 为 Bash、Zsh、Fish 和 PowerShell 提供自动补全功能,可以
307310
<!--
308311
1. Append or prepend the `kubectl-convert` binary folder to your `PATH` environment variable.
309312
310-
1. Verify plugin is successfully installed
313+
1. Verify the plugin is successfully installed.
311314
-->
312315
3. 将 `kubectl-convert` 二进制文件夹附加或添加到你的 `PATH` 环境变量中。
313316

0 commit comments

Comments
 (0)