Skip to content

Commit 3babf09

Browse files
committed
[zh] Resync tasks/tools pages
1 parent 4feea9c commit 3babf09

9 files changed

+98
-71
lines changed

content/zh-cn/docs/home/_index.md

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ menu:
1818
# Kubernetes is an open source container orchestration engine for automating deployment, scaling, and management of containerized applications. The open source project is hosted by the Cloud Native Computing Foundation.
1919
description: >
2020
Kubernetes 是一个开源的容器编排引擎,用来对容器化应用进行自动部署、 扩缩和管理。此开源项目由云原生计算基金会(CNCF)托管。
21+
2122
# overview:
2223
# Kubernetes is an open source container orchestration engine for automating deployment, scaling, and management of containerized applications. The open source project is hosted by the Cloud Native Computing Foundation (<a href="https://www.cncf.io/about">CNCF</a>).
2324
overview:
2425
Kubernetes 是一个开源的容器编排引擎,用来对容器化应用进行自动化部署、 扩缩和管理。该项目托管在 <a href="https://www.cncf.io/about">CNCF</a>。
25-
# cards:
26+
27+
cards:
2628
# - name: concepts
2729
# title: "Understand Kubernetes"
2830
# description: "Learn about Kubernetes and its fundamental concepts."
@@ -33,6 +35,16 @@ overview:
3335
# description: "Follow tutorials to learn how to deploy applications in Kubernetes."
3436
# button: "View Tutorials"
3537
# button_path: "/docs/tutorials"
38+
- name: concepts
39+
title: "了解 Kubernetes"
40+
description: "了解 Kubernetes 及其基础概念。"
41+
button: "查看概念"
42+
button_path: "/zh-cn/docs/concepts"
43+
- name: tutorials
44+
title: "尝试 Kubernetes"
45+
description: "按照教程学习如何在 Kubernetes 上部署应用。"
46+
button: "查看教程"
47+
button_path: "/zh-cn/docs/tutorials"
3648
# - name: setup
3749
# title: "Set up a K8s cluster"
3850
# description: "Get Kubernetes running based on your resources and needs."
@@ -43,6 +55,16 @@ overview:
4355
# description: "Look up common tasks and how to perform them using a short sequence of steps."
4456
# button: "View Tasks"
4557
# button_path: "/docs/tasks"
58+
- name: setup
59+
title: "安裝 K8s 集群"
60+
description: "基于你的资源情况和需要运行 Kubernetes。"
61+
button: "安装 Kubernetes"
62+
button_path: "/zh-cn/docs/setup"
63+
- name: tasks
64+
title: "了解如何使用 Kubernetes"
65+
description: "查看常见任务以及如何使用简单步骤执行它们。"
66+
button: "查看任务"
67+
button_path: "/zh-cn/docs/tasks"
4668
# - name: training
4769
# title: "Training"
4870
# description: "Get certified in Kubernetes and make your cloud native projects successful!"
@@ -53,40 +75,6 @@ overview:
5375
# description: Browse terminology, command line syntax, API resource types, and setup tool documentation.
5476
# button: View Reference
5577
# button_path: /docs/reference
56-
# - name: contribute
57-
# title: Contribute to the docs
58-
# description: Anyone can contribute, whether you’re new to the project or you’ve been around a long time.
59-
# button: Contribute to the docs
60-
# button_path: /docs/contribute
61-
# - name: release-notes
62-
# title: K8s Release Notes
63-
# description: If you are installing Kubernetes or upgrading to the newest version, refer to the current release notes.
64-
# button: "Download Kubernetes"
65-
# button_path: "/zh-cn/docs/setup/release/notes"
66-
# - name: about
67-
# title: About the documentation
68-
# description: This website contains documentation for the current and previous 4 versions of Kubernetes.
69-
cards:
70-
- name: concepts
71-
title: "了解 Kubernetes"
72-
description: "了解 Kubernetes 和其基础概念。"
73-
button: "查看概念"
74-
button_path: "/zh-cn/docs/concepts"
75-
- name: tutorials
76-
title: "尝试 Kubernetes"
77-
description: "按照教程学习如何在 Kubernetes 上部署应用。"
78-
button: "查看教程"
79-
button_path: "/zh-cn/docs/tutorials"
80-
- name: setup
81-
title: "设置 K8s 集群"
82-
description: "按照你的资源情况和需求运行 Kubernetes。"
83-
button: "设置 Kubernetes"
84-
button_path: "/zh-cn/docs/setup"
85-
- name: tasks
86-
title: "了解如何使用 Kubernetes"
87-
description: "查看常见任务以及如何使用简单步骤执行它们。"
88-
button: "查看任务"
89-
button_path: "/zh-cn/docs/tasks"
9078
- name: training
9179
title: "培训"
9280
description: "通过 Kubernetes 认证,助你的云原生项目成功!"
@@ -97,16 +85,29 @@ cards:
9785
description: 浏览术语、命令行语法、API 资源类型和安装工具文档。
9886
button: 查看参考
9987
button_path: /zh-cn/docs/reference
88+
# - name: contribute
89+
# title: Contribute to the docs
90+
# description: Anyone can contribute, whether you’re new to the project or you’ve been around a long time.
91+
# button: Contribute to the docs
92+
# button_path: /docs/contribute
93+
# - name: release-notes
94+
# title: K8s Release Notes
95+
# description: If you are installing Kubernetes or upgrading to the newest version, refer to the current release notes.
96+
# button: "Download Kubernetes"
97+
# button_path: "/zh-cn/docs/setup/release/notes"
10098
- name: contribute
10199
title: 为文档作贡献
102100
description: 任何人,无论对该项目熟悉与否,都能贡献自己的力量。
103101
button: 为文档作贡献
104102
button_path: /zh-cn/docs/contribute
105-
- name: release-notes
106-
title: K8s 发布说明
107-
description: 如果你正在安装或升级 Kubernetes,最好参考最新的发布说明
103+
- name: Download
104+
title: 下载 Kubernetes
105+
description: 安装 Kubernetes 或将其升级到最新版本
108106
button: "下载 Kubernetes"
109107
button_path: "/releases/download"
108+
# - name: about
109+
# title: About the documentation
110+
# description: This website contains documentation for the current and previous 4 versions of Kubernetes.
110111
- name: about
111112
title: 关于文档
112113
description: 本网站包含了当前及前 4 个版本的 Kubernetes 文档。

content/zh-cn/docs/tasks/tools/_index.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ kubectl 可安装在各种 Linux 平台、 macOS 和 Windows 上。
4747
## kind
4848

4949
<!--
50-
[`kind`](https://kind.sigs.k8s.io/docs/) lets you run Kubernetes on
50+
[`kind`](https://kind.sigs.k8s.io/) lets you run Kubernetes on
5151
your local computer. This tool requires that you have
5252
[Docker](https://docs.docker.com/get-docker/) installed and configured.
5353
@@ -56,10 +56,10 @@ shows you what you need to do to get up and running with kind.
5656
5757
<a class="btn btn-primary" href="https://kind.sigs.k8s.io/docs/user/quick-start/" role="button" aria-label="View kind Quick Start Guide">View kind Quick Start Guide</a>
5858
-->
59-
[`kind`](https://kind.sigs.k8s.io/docs/) 让你能够在本地计算机上运行 Kubernetes。
59+
[`kind`](https://kind.sigs.k8s.io/) 让你能够在本地计算机上运行 Kubernetes。
6060
`kind` 要求你安装并配置好 [Docker](https://docs.docker.com/get-docker/)
6161

62-
kind [快速入门](https://kind.sigs.k8s.io/docs/user/quick-start/)页面展示了开始使用
62+
kind [Quick Start](https://kind.sigs.k8s.io/docs/user/quick-start/) 页面展示开始使用
6363
`kind` 所需要完成的操作。
6464

6565
<a class="btn btn-primary" href="https://kind.sigs.k8s.io/docs/user/quick-start/"
@@ -81,8 +81,8 @@ on getting the tool installed.
8181
-->
8282
`kind` 类似,[`minikube`](https://minikube.sigs.k8s.io/) 是一个工具,
8383
能让你在本地运行 Kubernetes。
84-
`minikube` 在你的个人计算机(包括 Windows、macOS 和 Linux PC)上运行一个一体化(all-in-one)或多节点的本地
85-
Kubernetes 集群,以便你来尝试 Kubernetes 或者开展每天的开发工作。
84+
`minikube` 在你的个人计算机(包括 Windows、macOS 和 Linux PC)上运行一个一体化(all-in-one)
85+
或多节点的本地 Kubernetes 集群,以便你来尝试 Kubernetes 或者开展每天的开发工作。
8686

8787
如果你关注如何安装此工具,可以按官方的
8888
[Get Started!](https://minikube.sigs.k8s.io/docs/start/)指南操作。
@@ -125,3 +125,4 @@ Once installed, you can use it to [create a cluster](/docs/setup/production-envi
125125

126126
<a class="btn btn-primary" href="/zh-cn/docs/setup/production-environment/tools/kubeadm/install-kubeadm/"
127127
role="button" aria-label="查看 kubeadm 安装指南">查看 kubeadm 安装指南</a>
128+

content/zh-cn/docs/tasks/tools/included/_index.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@ title: "内含的工具"
33
description: "在页面 kubectl-installs-*.md 中包含的代码片段"
44
headless: true
55
toc_hide: true
6+
_build:
7+
list: never
8+
render: never
9+
publishResources: false
610
---
711
<!--
8-
---
912
title: "Tools Included"
1013
description: "Snippets to be included in the main kubectl-installs-*.md pages."
1114
headless: true
1215
toc_hide: true
13-
---
16+
_build:
17+
list: never
18+
render: never
19+
publishResources: false
1420
-->

content/zh-cn/docs/tasks/tools/included/kubectl-convert-overview.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@ title: "kubectl-convert 概述"
33
description: >-
44
一个 kubectl 插件,允许你将清单从一个 Kubernetes API 版本转换到不同的版本。
55
headless: true
6+
_build:
7+
list: never
8+
render: never
9+
publishResources: false
610
---
711
<!--
8-
---
912
title: "kubectl-convert overview"
1013
description: >-
1114
A kubectl plugin that allows you to convert manifests from one version
1215
of a Kubernetes API to a different version.
1316
headless: true
14-
---
1517
-->
1618

1719
<!--
@@ -21,4 +23,4 @@ For more info, visit [migrate to non deprecated apis](/docs/reference/using-api/
2123
-->
2224
一个 Kubernetes 命令行工具 `kubectl` 的插件,允许你将清单在不同 API 版本间转换。
2325
这对于将清单迁移到新的 Kubernetes 发行版上未被废弃的 API 版本时尤其有帮助。
24-
更多信息请访问 [迁移到非弃用 API](/zh-cn/docs/reference/using-api/deprecation-guide/#migrate-to-non-deprecated-apis)
26+
更多信息请访问[迁移到非弃用 API](/zh-cn/docs/reference/using-api/deprecation-guide/#migrate-to-non-deprecated-apis)

content/zh-cn/docs/tasks/tools/included/kubectl-whats-next.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
title: "后续内容"
33
description: "安装 kubectl 之后,还可以做些什么?"
44
headless: true
5+
_build:
6+
list: never
7+
render: never
8+
publishResources: false
59
---
610
<!--
7-
---
811
title: "What's next?"
912
description: "What's next after installing kubectl."
1013
headless: true
11-
---
1214
-->
1315

1416
<!--
@@ -19,9 +21,10 @@ headless: true
1921
[Sharing Cluster Access document](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/).
2022
* Read the [kubectl reference docs](/docs/reference/kubectl/kubectl/)
2123
-->
22-
* [安装 Minikube](https://minikube.sigs.k8s.io/docs/start/)
23-
* 有关创建集群的更多信息,请参阅[入门指南](/zh-cn/docs/setup/).
24-
* [学习如何启动并对外公开你的应用程序。](/zh-cn/docs/tasks/access-application-cluster/service-access-application-cluster/)
25-
* 如果你需要访问其他人创建的集群,请参阅
26-
[共享集群接入文档](/zh-cn/docs/tasks/access-application-cluster/configure-access-multiple-clusters/).
27-
* 阅读 [kubectl 参考文档](/zh-cn/docs/reference/kubectl/kubectl/)
24+
* [安装 Minikube](https://minikube.sigs.k8s.io/docs/start/)
25+
* 有关创建集群的更多信息,请参阅[入门指南](/zh-cn/docs/setup/)
26+
* [学习如何启动并对外公开你的应用程序](/zh-cn/docs/tasks/access-application-cluster/service-access-application-cluster/)
27+
* 如果你需要访问其他人创建的集群,
28+
请参阅[共享集群接入文档](/zh-cn/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)
29+
* 阅读 [kubectl 参考文档](/zh-cn/docs/reference/kubectl/kubectl/)
30+

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
title: "Linux 系统中的 Bash 自动补全功能"
33
description: "Linux 系统中 Bash 自动补全功能的一些可选配置。"
44
headless: true
5+
_build:
6+
list: never
7+
render: never
8+
publishResources: false
9+
510
---
611
<!--
712
title: "bash auto-completion on Linux"
@@ -96,11 +101,11 @@ bash-completion 负责导入 `/etc/bash_completion.d` 目录中的所有补全
96101

97102
<!--
98103
Both approaches are equivalent. After reloading your shell, kubectl autocompletion should be working.
99-
To enable bash autocompletion in current session of shell, run `exec bash`:
104+
To enable bash autocompletion in current session of shell, source the ~/.bashrc file:
100105
-->
101106
两种方式的效果相同。重新加载 Shell 后,kubectl 自动补全功能即可生效。
102-
若要在当前 Shell 会话中启用 Bash 补全功能,需要运行 `exec bash` 命令
107+
若要在当前 Shell 会话中启用 Bash 补全功能,源引 `~/.bashrc` 文件
103108

104109
```bash
105-
exec bash
110+
source ~/.bashrc
106111
```

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,25 @@
22
title: "PowerShell 自动补全"
33
description: "powershell 自动补全的一些可选配置。"
44
headless: true
5+
_build:
6+
list: never
7+
render: never
8+
publishResources: false
59
---
610
<!--
7-
---
811
title: "PowerShell auto-completion"
912
description: "Some optional configuration for powershell auto-completion."
1013
headless: true
11-
---
1214
-->
1315

1416
<!--
1517
The kubectl completion script for PowerShell can be generated with the command `kubectl completion powershell`.
1618
1719
To do so in all your shell sessions, add the following line to your `$PROFILE` file:
1820
-->
19-
使用命令 `kubectl completion powershell` 生成 PowerShell 的 kubectl 自动补全脚本。
21+
你可以使用命令 `kubectl completion powershell` 生成 PowerShell 的 kubectl 自动补全脚本。
2022

21-
如果需要自动补全在所有 shell 会话中生效,请将以下命令添加到 `$PROFILE` 文件中:
23+
如果需要自动补全在所有 Shell 会话中生效,请将以下命令添加到 `$PROFILE` 文件中:
2224

2325
```powershell
2426
kubectl completion powershell | Out-String | Invoke-Expression
@@ -32,7 +34,7 @@ This command will regenerate the auto-completion script on every PowerShell star
3234
<!--
3335
To add the generated script to your `$PROFILE` file, run the following line in your powershell prompt:
3436
-->
35-
如果需要将自动补全脚本直接添加到 `$PROFILE` 文件中,请在 PowerShell 终端运行以下命令
37+
如果需要将自动补全脚本直接添加到 `$PROFILE` 文件中,请在 PowerShell 命令行运行以下命令
3638

3739
```powershell
3840
kubectl completion powershell >> $PROFILE
@@ -41,4 +43,4 @@ kubectl completion powershell >> $PROFILE
4143
<!--
4244
After reloading your shell, kubectl autocompletion should be working.
4345
-->
44-
完成上述操作后重启 shell,kubectl的自动补全就可以工作了
46+
完成上述操作后重启 Shell,kubectl 的自动补全就可以工作了

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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
title: "zsh 自动补全"
33
description: "zsh 自动补全的一些可选配置"
44
headless: true
5+
_build:
6+
list: never
7+
render: never
8+
publishResources: false
59
---
610
<!--
7-
---
811
title: "zsh auto-completion"
912
description: "Some optional configuration for zsh auto-completion."
1013
headless: true
11-
---
1214
-->
1315

1416
<!--
@@ -17,9 +19,9 @@ The kubectl completion script for Zsh can be generated with the command `kubectl
1719
To do so in all your shell sessions, add the following to your `~/.zshrc` file:
1820
-->
1921
kubectl 通过命令 `kubectl completion zsh` 生成 Zsh 自动补全脚本。
20-
shell 中导入(Sourcing)该自动补全脚本,将启动 kubectl 自动补全功能。
22+
Shell 中导入(Sourcing)该自动补全脚本,将启动 kubectl 自动补全功能。
2123

22-
为了在所有的 shell 会话中实现此功能,请将下面内容加入到文件 `~/.zshrc` 中。
24+
为了在所有的 Shell 会话中实现此功能,请将下面内容加入到文件 `~/.zshrc` 中。
2325

2426
```zsh
2527
source <(kubectl completion zsh)
@@ -36,10 +38,13 @@ After reloading your shell, kubectl autocompletion should be working.
3638
If you get an error like `complete:13: command not found: compdef`, then add the following to the beginning of your `~/.zshrc` file:
3739
If you get an error like `2: command not found: compdef`, then add the following to the beginning of your `~/.zshrc` file:
3840
-->
39-
重新加载 shell 后,kubectl 自动补全功能将立即生效。
41+
重新加载 Shell 后,kubectl 自动补全功能将立即生效。
42+
43+
如果你收到 `2: command not found: compdef` 这样的错误提示,那请将下面内容添加到
44+
`~/.zshrc` 文件的开头:
4045

41-
如果你收到 `2: command not found: compdef` 这样的错误提示,那请将下面内容添加到 `~/.zshrc` 文件的开头:
4246
```zsh
4347
autoload -Uz compinit
4448
compinit
4549
```
50+

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ The following methods exist for installing kubectl on macOS:
5858
- [可选的 kubectl 配置和插件](#optional-kubectl-configurations-and-plugins)
5959
- [启用 shell 自动补全功能](#enable-shell-autocompletion)
6060
- [安装 `kubectl convert` 插件](#install-kubectl-convert-plugin)
61+
6162
<!--
6263
### Install kubectl binary with curl on macOS
6364
-->
@@ -426,3 +427,4 @@ kubectl 为 Bash、Zsh、Fish 和 PowerShell 提供自动补全功能,可以
426427
## {{% heading "whatsnext" %}}
427428

428429
{{< include "included/kubectl-whats-next.md" >}}
430+

0 commit comments

Comments
 (0)