Skip to content

Commit 6d59413

Browse files
committed
[zh] Update tutorials/kubernetes-basics files
1 parent 2e73bd8 commit 6d59413

6 files changed

Lines changed: 104 additions & 13 deletions

File tree

content/zh-cn/docs/tutorials/kubernetes-basics/create-cluster/cluster-intro.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ weight: 10
1818
* 了解 Minikube。
1919
* 在你的电脑上启动一个 Kubernetes 集群。
2020

21+
<!--
22+
The shell commands in this tutorial use POSIX shell syntax, which is supported by
23+
the default shells on most Linux and macOS systems (for example, bash, zsh, or sh).
24+
Windows users must use a POSIX-compatible shell such as
25+
[Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install)
26+
or [Git Bash](https://gitforwindows.org/) to run the commands as written.
27+
Commands that use `export`, `$()`, and similar constructs are **not** compatible
28+
with PowerShell or the Windows Command Prompt.
29+
-->
30+
本教程中的 Shell 命令使用 POSIX Shell 语法,
31+
大多数 Linux 和 macOS 系统的默认 Shell(例如 bash、zsh 或 sh)都支持这种语法。
32+
Windows 用户必须使用兼容 POSIX 的 Shell,例如
33+
[Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install)
34+
[Git Bash](https://gitforwindows.org/),才能按本文所述的方式运行这些命令。
35+
使用 `export``$()` 以及类似构造的命令 **不兼容** PowerShell 或 Windows Command Prompt。
36+
2137
<!--
2238
## Kubernetes Clusters
2339
-->

content/zh-cn/docs/tutorials/kubernetes-basics/deploy-app/deploy-intro.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,22 @@ weight: 10
1616
* 学习应用的部署。
1717
* 使用 kubectl 在 Kubernetes 上部署第一个应用。
1818

19+
<!--
20+
The shell commands in this tutorial use POSIX shell syntax, which is supported by
21+
the default shells on most Linux and macOS systems (for example, bash, zsh, or sh).
22+
Windows users must use a POSIX-compatible shell such as
23+
[Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install)
24+
or [Git Bash](https://gitforwindows.org/) to run the commands as written.
25+
Commands that use `export`, `$()`, and similar constructs are **not** compatible
26+
with PowerShell or the Windows Command Prompt.
27+
-->
28+
本教程中的 Shell 命令使用 POSIX Shell 语法,
29+
大多数 Linux 和 macOS 系统的默认 Shell(例如 bash、zsh 或 sh)都支持这种语法。
30+
Windows 用户必须使用兼容 POSIX 的 Shell,例如
31+
[Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install)
32+
[Git Bash](https://gitforwindows.org/),才能按本文所述的方式运行这些命令。
33+
使用 `export``$()` 以及类似构造的命令 **不兼容** PowerShell 或 Windows Command Prompt。
34+
1935
<!--
2036
## Kubernetes Deployments
2137
-->

content/zh-cn/docs/tutorials/kubernetes-basics/explore/explore-intro.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ weight: 10
1818
* 了解 Kubernetes 节点。
1919
* 对已部署的应用进行故障排查。
2020

21+
<!--
22+
The shell commands in this tutorial use POSIX shell syntax, which is supported by
23+
the default shells on most Linux and macOS systems (for example, bash, zsh, or sh).
24+
Windows users must use a POSIX-compatible shell such as
25+
[Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install)
26+
or [Git Bash](https://gitforwindows.org/) to run the commands as written.
27+
Commands that use `export`, `$()`, and similar constructs are **not** compatible
28+
with PowerShell or the Windows Command Prompt.
29+
-->
30+
本教程中的 Shell 命令使用 POSIX Shell 语法,
31+
大多数 Linux 和 macOS 系统的默认 Shell(例如 bash、zsh 或 sh)都支持这种语法。
32+
Windows 用户必须使用兼容 POSIX 的 Shell,例如
33+
[Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install)
34+
[Git Bash](https://gitforwindows.org/),才能按本文所述的方式运行这些命令。
35+
使用 `export``$()` 以及类似构造的命令 **不兼容** PowerShell 或 Windows Command Prompt。
36+
2137
<!--
2238
## Kubernetes Pods
2339
-->

content/zh-cn/docs/tutorials/kubernetes-basics/expose/expose-intro.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ weight: 10
1818
* 了解标签(Label)和选择算符(Selector)如何与 Service 关联
1919
* 用 Service 向 Kubernetes 集群外公开应用
2020

21+
<!--
22+
The shell commands in this tutorial use POSIX shell syntax, which is supported by
23+
the default shells on most Linux and macOS systems (for example, bash, zsh, or sh).
24+
Windows users must use a POSIX-compatible shell such as
25+
[Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install)
26+
or [Git Bash](https://gitforwindows.org/) to run the commands as written.
27+
Commands that use `export`, `$()`, and similar constructs are **not** compatible
28+
with PowerShell or the Windows Command Prompt.
29+
-->
30+
本教程中的 Shell 命令使用 POSIX Shell 语法,
31+
大多数 Linux 和 macOS 系统的默认 Shell(例如 bash、zsh 或 sh)都支持这种语法。
32+
Windows 用户必须使用兼容 POSIX 的 Shell,例如
33+
[Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install)
34+
[Git Bash](https://gitforwindows.org/),才能按本文所述的方式运行这些命令。
35+
使用 `export``$()` 以及类似构造的命令 **不兼容** PowerShell 或 Windows Command Prompt。
36+
2137
<!--
2238
## Overview of Kubernetes Services
2339

content/zh-cn/docs/tutorials/kubernetes-basics/scale/scale-intro.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,26 @@ weight: 10
1414
-->
1515
* 使用 kubectl 手动扩缩现有的应用
1616

17+
<!--
18+
The shell commands in this tutorial use POSIX shell syntax, which is supported by
19+
the default shells on most Linux and macOS systems (for example, bash, zsh, or sh).
20+
Windows users must use a POSIX-compatible shell such as
21+
[Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install)
22+
or [Git Bash](https://gitforwindows.org/) to run the commands as written.
23+
Commands that use `export`, `$()`, and similar constructs are **not** compatible
24+
with PowerShell or the Windows Command Prompt.
25+
-->
26+
本教程中的 Shell 命令使用 POSIX Shell 语法,
27+
大多数 Linux 和 macOS 系统的默认 Shell(例如 bash、zsh 或 sh)都支持这种语法。
28+
Windows 用户必须使用兼容 POSIX 的 Shell,例如
29+
[Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install)
30+
[Git Bash](https://gitforwindows.org/),才能按本文所述的方式运行这些命令。
31+
使用 `export``$()` 以及类似构造的命令 **不兼容** PowerShell 或 Windows Command Prompt。
32+
1733
<!--
1834
## Scaling an application
1935
-->
20-
## 扩缩应用
36+
## 扩缩应用 {#scaling-an-application}
2137

2238
{{% alert %}}
2339
<!--

content/zh-cn/docs/tutorials/kubernetes-basics/update/update-intro.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,26 @@ Perform a rolling update using kubectl.
1414
-->
1515
使用 kubectl 执行滚动更新。
1616

17+
<!--
18+
The shell commands in this tutorial use POSIX shell syntax, which is supported by
19+
the default shells on most Linux and macOS systems (for example, bash, zsh, or sh).
20+
Windows users must use a POSIX-compatible shell such as
21+
[Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install)
22+
or [Git Bash](https://gitforwindows.org/) to run the commands as written.
23+
Commands that use `export`, `$()`, and similar constructs are **not** compatible
24+
with PowerShell or the Windows Command Prompt.
25+
-->
26+
本教程中的 Shell 命令使用 POSIX Shell 语法,
27+
大多数 Linux 和 macOS 系统的默认 Shell(例如 bash、zsh 或 sh)都支持这种语法。
28+
Windows 用户必须使用兼容 POSIX 的 Shell,例如
29+
[Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install)
30+
[Git Bash](https://gitforwindows.org/),才能按本文所述的方式运行这些命令。
31+
使用 `export``$()` 以及类似构造的命令 **不兼容** PowerShell 或 Windows Command Prompt。
32+
1733
<!--
1834
## Updating an application
1935
-->
20-
## 更新应用
36+
## 更新应用 {#updating-an-application}
2137

2238
{{% alert %}}
2339
<!--
@@ -76,23 +92,18 @@ versioned and any Deployment update can be reverted to a previous (stable) versi
7692

7793
{{% alert %}}
7894
<!--
79-
_If a Deployment is exposed publicly, the Service will load-balance the traffic
80-
only to available Pods during the update._
95+
If a Deployment is publicly exposed, the Service will send traffic only to Pods that can handle requests.
96+
This ensures users continue to access the application during an update.
8197
-->
82-
**如果 Deployment 的访问是公开的,Service
83-
在更新期间仅将流量负载均衡到可用的 Pod。**
98+
如果 Deployment 的访问是公开的,Service 只将流量发送到能够处理请求的 Pod。
99+
这可以确保在更新期间,用户仍然可以继续访问此应用。
84100
{{% /alert %}}
85101

86102
<!--
87-
Similar to application Scaling, if a Deployment is exposed publicly, the Service
88-
will load-balance the traffic only to available Pods during the update. An available
89-
Pod is an instance that is available to the users of the application.
90-
103+
During a rolling update, this behavior keeps the application available by routing traffic only to Pods that are serving requests.
91104
Rolling updates allow the following actions:
92105
-->
93-
与应用程序规模扩缩类似,如果 Deployment 的访问是公开的,Service
94-
在更新期间仅将流量负载均衡到可用的 Pod。可用的 Pod 是指对应用的用户可用的实例。
95-
106+
在滚动更新期间,这种行为通过仅将流量路由到正在处理请求的 Pod 来保持应用的可用性。
96107
滚动更新允许以下操作:
97108

98109
<!--

0 commit comments

Comments
 (0)