Skip to content

Commit fe0f825

Browse files
authored
Merge pull request #40325 from my-git9/zh-sync123
[zh-cn]sync tasks/tools
2 parents bb9b0fc + 62b07b7 commit fe0f825

File tree

4 files changed

+24
-10
lines changed

4 files changed

+24
-10
lines changed

content/zh-cn/docs/tasks/tools/included/optional-kubectl-configs-bash-mac.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ Homebrew 通常把它安装为 `/usr/local/bin/bash`。
9797
### 安装 bash-completion {#install-bash-completion}
9898

9999
{{< note >}}
100-
<!--
101-
As mentioned, these instructions assume you use Bash 4.1+, which means you will
102-
install bash-completion v2 (in contrast to Bash 3.2 and bash-completion v1,
100+
<!--
101+
As mentioned, these instructions assume you use Bash 4.1+,
102+
which means you will install bash-completion v2 (in contrast to Bash 3.2 and bash-completion v1,
103103
in which case kubectl completion won't work).
104104
-->
105105
如前所述,本说明假定你使用的 Bash 版本为 4.1+,这意味着你要安装 bash-completion v2

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

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ card:
2222
## {{% heading "prerequisites" %}}
2323

2424
<!--
25-
You must use a kubectl version that is within one minor version difference of your cluster. For example, a v{{< skew currentVersion >}} client can communicate with v{{< skew currentVersionAddMinor -1 >}}, v{{< skew currentVersionAddMinor 0 >}}, and v{{< skew currentVersionAddMinor 1 >}} control planes.
25+
You must use a kubectl version that is within one minor version difference of your cluster.
26+
For example, a v{{< skew currentVersion >}} client can communicate
27+
with v{{< skew currentVersionAddMinor -1 >}}, v{{< skew currentVersionAddMinor 0 >}},
28+
and v{{< skew currentVersionAddMinor 1 >}} control planes.
2629
Using the latest compatible version of kubectl helps avoid unforeseen issues.
2730
-->
2831
kubectl 版本和集群版本之间的差异必须在一个小版本号内。
@@ -65,7 +68,8 @@ The following methods exist for installing kubectl on Linux:
6568

6669
{{< note >}}
6770
<!--
68-
To download a specific version, replace the `$(curl -L -s https://dl.k8s.io/release/stable.txt)` portion of the command with the specific version.
71+
To download a specific version, replace the `$(curl -L -s https://dl.k8s.io/release/stable.txt)`
72+
portion of the command with the specific version.
6973
7074
For example, to download version {{< param "fullversion" >}} on Linux, type:
7175
-->
@@ -138,7 +142,8 @@ The following methods exist for installing kubectl on Linux:
138142

139143
{{< note >}}
140144
<!--
141-
If you do not have root access on the target system, you can still install kubectl to the `~/.local/bin` directory:
145+
If you do not have root access on the target system, you can still install
146+
kubectl to the `~/.local/bin` directory:
142147
-->
143148
即使你没有目标系统的 root 权限,仍然可以将 kubectl 安装到目录 `~/.local/bin` 中:
144149

@@ -200,7 +205,9 @@ Or use this for detailed view of version:
200205
<!--
201206
If you use Debian 9 (stretch) or earlier you would also need to install `apt-transport-https`:
202207
-->
208+
203209
如果你使用 Debian 9(stretch)或更早版本,则你还需要安装 `apt-transport-https`
210+
204211
```shell
205212
sudo apt-get install -y apt-transport-https
206213
```
@@ -271,7 +278,9 @@ sudo yum install -y kubectl
271278
{{< tabs name="other_kubectl_install" >}}
272279
{{% tab name="Snap" %}}
273280
<!--
274-
If you are on Ubuntu or another Linux distribution that supports the [snap](https://snapcraft.io/docs/core/install) package manager, kubectl is available as a [snap](https://snapcraft.io/) application.
281+
If you are on Ubuntu or another Linux distribution that supports the
282+
[snap](https://snapcraft.io/docs/core/install) package manager, kubectl
283+
is available as a [snap](https://snapcraft.io/) application.
275284
-->
276285
如果你使用的 Ubuntu 或其他 Linux 发行版,内建支持
277286
[snap](https://snapcraft.io/docs/core/install) 包管理工具,
@@ -286,7 +295,8 @@ kubectl version --client
286295

287296
{{% tab name="Homebrew" %}}
288297
<!--
289-
If you are on Linux and using [Homebrew](https://docs.brew.sh/Homebrew-on-Linux) package manager, kubectl is available for [installation](https://docs.brew.sh/Homebrew-on-Linux#install).
298+
If you are on Linux and using [Homebrew](https://docs.brew.sh/Homebrew-on-Linux)
299+
package manager, kubectl is available for [installation](https://docs.brew.sh/Homebrew-on-Linux#install).
290300
-->
291301
如果你使用 Linux 系统,并且装了 [Homebrew](https://docs.brew.sh/Homebrew-on-Linux)
292302
包管理工具,
@@ -318,7 +328,8 @@ kubectl version --client
318328
### 启用 shell 自动补全功能 {#enable-shell-autocompletion}
319329

320330
<!--
321-
kubectl provides autocompletion support for Bash, Zsh, Fish, and PowerShell, which can save you a lot of typing.
331+
kubectl provides autocompletion support for Bash, Zsh, Fish, and PowerShell,
332+
which can save you a lot of typing.
322333
323334
Below are the procedures to set up autocompletion for Bash, Fish, and Zsh.
324335
-->

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ The following methods exist for installing kubectl on macOS:
201201
```
202202
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.
203203
```
204+
204205
<!--
205206
You can ignore this warning. You are only checking the version of `kubectl` that you
206207
have installed.

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ The following methods exist for installing kubectl on Windows:
127127
```cmd
128128
kubectl version --client
129129
```
130+
130131
{{< note >}}
131132
<!--
132133
The above command will generate a warning:
@@ -333,7 +334,8 @@ kubectl 为 Bash、Zsh、Fish 和 PowerShell 提供自动补全功能,可以
333334
```
334335
335336
<!--
336-
- Using PowerShell to automate the verification using the `-eq` operator to get a `True` or `False` result:
337+
- Using PowerShell to automate the verification using the `-eq` operator to get
338+
a `True` or `False` result:
337339
-->
338340
339341
- 使用 PowerShell `-eq` 操作使验证自动化,获得 `True` 或者 `False` 的结果:

0 commit comments

Comments
 (0)