Merge pull request #33731 from my-git9/mygit22

adjust format in content/zh/docs/tutorials/stateful-application
This commit is contained in:
Kubernetes Prow Robot
2022-05-16 06:02:18 -07:00
committed by GitHub
3 changed files with 13 additions and 13 deletions
@@ -129,7 +129,7 @@ In the second terminal, use
Headless Service and StatefulSet defined in `web.yaml`.
-->
在另一个终端中,使用 [`kubectl apply`](/zh/docs/reference/generated/kubectl/kubectl-commands/#apply)来创建定义在 `web.yaml` 中的 Headless Service 和 StatefulSet。
在另一个终端中,使用 [`kubectl apply`](/zh/docs/reference/generated/kubectl/kubectl-commands/#apply) 来创建定义在 `web.yaml` 中的 Headless Service 和 StatefulSet。
```shell
kubectl apply -f web.yaml
@@ -1691,7 +1691,7 @@ StatefulSet 启动了两个新的 Pod,而且在启动第二个之前并没有
## {{% heading "cleanup" %}}
应该打开两个终端,准备在清理过程中运行 `kubectl` 命令。
应该打开两个终端,准备在清理过程中运行 `kubectl` 命令。
```shell
kubectl delete sts web
@@ -423,7 +423,7 @@ By using environment variables you can change values that are inserted into `cas
并且包含 OpenJDK 8。
该映像包括来自 Apache Debian 存储库的标准 Cassandra 安装。
通过使用环境变量,可以更改插入到 `cassandra.yaml` 中的值。
通过使用环境变量,可以更改插入到 `cassandra.yaml` 中的值。
| 环境变量 | 默认值 |
| ------------------------ |:---------------: |
@@ -48,7 +48,7 @@ This tutorial shows you how to deploy a WordPress site and a MySQL database usin
The files provided in this tutorial are using GA Deployment APIs and are specific to kubernetes version 1.9 and later. If you wish to use this tutorial with an earlier version of Kubernetes, please update the API version appropriately, or reference earlier versions of this tutorial.
-->
本教程中提供的文件使用 GA Deployment API,并且特定于 kubernetes 1.9 或更高版本。如果希望将本教程与 Kubernetes 的早期版本一起使用,请相应地更新 API 版本,或参考本教程的早期版本。
本教程中提供的文件使用 GA Deployment API,并且特定于 kubernetes 1.9 或更高版本。如果希望将本教程与 Kubernetes 的早期版本一起使用,请相应地更新 API 版本,或参考本教程的早期版本。
{{< /note >}}
@@ -126,7 +126,7 @@ MySQL 和 Wordpress 都需要一个 PersistentVolume 来存储数据。他们的
In local clusters, the default StorageClass uses the `hostPath` provisioner. `hostPath` volumes are only suitable for development and testing. With `hostPath` volumes, your data lives in `/tmp` on the node the Pod is scheduled onto and does not move between nodes. If a Pod dies and gets scheduled to another node in the cluster, or the node is rebooted, the data is lost.
-->
在本地群集中,默认的 StorageClass 使用`hostPath`供应器。 `hostPath`卷仅适用于开发和测试。使用 `hostPath` 卷,的数据位于 Pod 调度到的节点上的`/tmp`中,并且不会在节点之间移动。如果 Pod 死亡并被调度到群集中的另一个节点,或者该节点重新启动,则数据将丢失。
在本地群集中,默认的 StorageClass 使用`hostPath`供应器。 `hostPath`卷仅适用于开发和测试。使用 `hostPath` 卷,的数据位于 Pod 调度到的节点上的`/tmp`中,并且不会在节点之间移动。如果 Pod 死亡并被调度到群集中的另一个节点,或者该节点重新启动,则数据将丢失。
{{< /warning >}}
{{< note >}}
@@ -161,9 +161,9 @@ A [Secret](/docs/concepts/configuration/secret/) is an object that stores a piec
Add a Secret generator in `kustomization.yaml` from the following command. You will need to replace `YOUR_PASSWORD` with the password you want to use.
-->
A [Secret](/zh/docs/concepts/configuration/secret/) 是存储诸如密码或密钥之类的敏感数据的对象。从 1.14 开始,`kubectl`支持使用 kustomization 文件管理 Kubernetes 对象。可以通过`kustomization.yaml`中的生成器创建一个 Secret。
A [Secret](/zh/docs/concepts/configuration/secret/) 是存储诸如密码或密钥之类的敏感数据的对象。从 1.14 开始,`kubectl`支持使用 kustomization 文件管理 Kubernetes 对象。可以通过`kustomization.yaml`中的生成器创建一个 Secret。
通过以下命令在`kustomization.yaml`中添加一个 Secret 生成器。需要用要使用的密码替换`YOUR_PASSWORD`
通过以下命令在`kustomization.yaml`中添加一个 Secret 生成器。需要用要使用的密码替换`YOUR_PASSWORD`
```shell
cat <<EOF >./kustomization.yaml
@@ -344,12 +344,12 @@ Now you can verify that all objects exist.
-->
`kustomization.yaml`包含用于部署 WordPress 网站的所有资源以及 MySQL 数据库。可以通过以下方式应用目录
`kustomization.yaml`包含用于部署 WordPress 网站的所有资源以及 MySQL 数据库。可以通过以下方式应用目录
```shell
kubectl apply -k ./
```
现在,可以验证所有对象是否存在。
现在,可以验证所有对象是否存在。
1. 通过运行以下命令验证 Secret 是否存在:
@@ -428,9 +428,9 @@ kubectl apply -k ./
http://1.2.3.4:32406
```
6. 复制 IP 地址,然后将页面加载到浏览器中来查看的站点。
6. 复制 IP 地址,然后将页面加载到浏览器中来查看的站点。
应该看到类似于以下屏幕截图的 WordPress 设置页面。
应该看到类似于以下屏幕截图的 WordPress 设置页面。
![wordpress-init](https://raw.githubusercontent.com/kubernetes/examples/master/mysql-wordpress-pd/WordPress.png)
@@ -440,7 +440,7 @@ kubectl apply -k ./
<!--
Do not leave your WordPress installation on this page. If another user finds it, they can set up a website on your instance and use it to serve malicious content. <br/><br/>Either install WordPress by creating a username and password or delete your instance.
-->
不要在此页面上保留 WordPress 安装。如果其他用户找到了它,他们可以在的实例上建立一个网站并使用它来提供恶意内容。<br/><br/>通过创建用户名和密码来安装 WordPress 或删除的实例。
不要在此页面上保留 WordPress 安装。如果其他用户找到了它,他们可以在的实例上建立一个网站并使用它来提供恶意内容。<br/><br/>通过创建用户名和密码来安装 WordPress 或删除的实例。
{{< /warning >}}
@@ -454,7 +454,7 @@ Do not leave your WordPress installation on this page. If another user finds it,
```
-->
1. 运行一下命令删除的 SecretDeploymentsServices and PersistentVolumeClaims
1. 运行一下命令删除的 SecretDeploymentsServices and PersistentVolumeClaims
```shell
kubectl delete -k ./