Skip to content

Commit 16b6bc8

Browse files
committed
[zh] Sync tasks/tools/install-kubectl-linux.md
1 parent 7811f25 commit 16b6bc8

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

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

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ The following methods exist for installing kubectl on Linux:
158158
-->
159159
即使你没有目标系统的 root 权限,仍然可以将 kubectl 安装到目录 `~/.local/bin` 中:
160160

161+
<!--
162+
# and then append (or prepend) ~/.local/bin to $PATH
163+
-->
161164
```bash
162165
chmod +x kubectl
163166
mkdir -p ~/.local/bin
@@ -202,13 +205,13 @@ Or use this for detailed view of version:
202205
```shell
203206
sudo apt-get update
204207
# apt-transport-https may be a dummy package; if so, you can skip that package
205-
sudo apt-get install -y apt-transport-https ca-certificates curl
208+
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg
206209
```
207210
-->
208211
```shell
209212
sudo apt-get update
210213
# apt-transport-https 可以是一个虚拟包;如果是这样,你可以跳过这个包
211-
sudo apt-get install -y apt-transport-https ca-certificates curl
214+
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg
212215
```
213216

214217
<!--
@@ -259,7 +262,7 @@ In releases older than Debian 12 and Ubuntu 22.04, folder `/etc/apt/keyrings` do
259262
{{< note >}}
260263
<!--
261264
To upgrade kubectl to another minor release, you'll need to bump the version in `/etc/apt/sources.list.d/kubernetes.list` before running `apt-get update` and `apt-get upgrade`. This procedure is described in more detail in [Changing The Kubernetes Package Repository](/docs/tasks/administer-cluster/kubeadm/change-package-repository/).
262-
-->
265+
-->
263266
要将 kubectl 升级到别的次要版本,你需要先升级 `/etc/apt/sources.list.d/kubernetes.list` 中的版本,
264267
再运行 `apt-get update``apt-get upgrade` 命令。
265268
更详细的步骤可以在[更改 Kubernetes 软件包存储库](/zh-cn/docs/tasks/administer-cluster/kubeadm/change-package-repository/)中找到。
@@ -268,7 +271,6 @@ To upgrade kubectl to another minor release, you'll need to bump the version in
268271
<!--
269272
4. Update `apt` package index, then install kubectl:
270273
-->
271-
272274
4. 更新 `apt` 包索引,然后安装 kubectl:
273275

274276
```shell
@@ -377,14 +379,14 @@ To upgrade kubectl to another minor release, you'll need to bump the version in
377379
此过程在[更改 Kubernetes 软件包仓库](/zh-cn/docs/tasks/administer-cluster/kubeadm/change-package-repository/)中有更详细的描述。
378380
{{< /note >}}
379381
380-
<!--
381-
2. Install kubectl using `zypper`:
382-
-->
383-
2. 使用 `zypper` 安装 kubectl:
382+
<!--
383+
2. Install kubectl using `zypper`:
384+
-->
385+
2. 使用 `zypper` 安装 kubectl:
384386
385-
```bash
386-
sudo zypper install -y kubectl
387-
```
387+
```bash
388+
sudo zypper install -y kubectl
389+
```
388390
389391
{{% /tab %}}
390392

0 commit comments

Comments
 (0)