diff --git a/content/zh-cn/docs/concepts/configuration/overview.md b/content/zh-cn/docs/concepts/configuration/overview.md index 2d0b3873d2..e3dcfb8747 100644 --- a/content/zh-cn/docs/concepts/configuration/overview.md +++ b/content/zh-cn/docs/concepts/configuration/overview.md @@ -296,11 +296,11 @@ for a comprehensive list. - 使用标签选择器进行 `get` 和 `delete` 操作,而不是特定的对象名称。 - 请参阅[标签选择器](/zh-cn/docs/concepts/overview/working-with-objects/labels/#label-selectors)和 - [有效使用标签](/zh-cn/docs/concepts/cluster-administration/manage-deployment/#using-labels-effectively)部分。 + [有效使用标签](/zh-cn/docs/concepts/overview/working-with-objects/labels/#using-labels-effectively)部分。 本教程向你展示如何使用 Kubernetes 和 [Docker](https://www.docker.com/) -构建和部署一个简单的 **(非面向生产的)** 多层 Web 应用程序。本例由以下组件组成: +构建和部署一个简单的 **(非面向生产的)** 多层 Web 应用。本例由以下组件组成: -留言板应用程序使用 Redis 存储数据。 +留言板应用使用 Redis 存储数据。 下面包含的清单文件指定了一个 Deployment 控制器,该控制器运行一个 Redis Pod 副本。 -{{< code file="application/guestbook/redis-leader-deployment.yaml" >}} +{{% code_sample file="application/guestbook/redis-leader-deployment.yaml" %}} -留言板应用程序需要往 Redis 中写数据。因此,需要创建 +留言板应用需要往 Redis 中写数据。因此,需要创建 [Service](/zh-cn/docs/concepts/services-networking/service/) 来转发 Redis Pod 的流量。Service 定义了访问 Pod 的策略。 -{{< code file="application/guestbook/redis-leader-service.yaml" >}} +{{% code_sample file="application/guestbook/redis-leader-service.yaml" %}} -1. 使用下面的 `redis-leader-service.yaml` 文件创建 Redis的服务: +1. 使用下面的 `redis-leader-service.yaml` 文件创建 Redis 的服务: -这个清单文件创建了一个名为 `redis-leader` 的 Service,其中包含一组 -与前面定义的标签匹配的标签,因此服务将网络流量路由到 Redis Pod 上。 +这个清单文件创建了一个名为 `redis-leader` 的 Service, +其中包含一组与前面定义的标签匹配的标签,因此服务将网络流量路由到 Redis Pod 上。 {{< /note >}} @@ -321,8 +319,8 @@ jQuery-Ajax-based UX. 接下来可以启动 Guestbook 的 Web 服务器了。 与 Redis 跟随者类似,前端也是使用 Kubernetes Deployment 来部署的。 -Guestbook 应用使用 PHP 前端。该前端被配置成与后端的 Redis 跟随者或者 -领导者服务通信,具体选择哪个服务取决于请求是读操作还是写操作。 +Guestbook 应用使用 PHP 前端。该前端被配置成与后端的 Redis +跟随者或者领导者服务通信,具体选择哪个服务取决于请求是读操作还是写操作。 前端对外暴露一个 JSON 接口,并提供基于 jQuery-Ajax 的用户体验。 ### 创建 Guestbook 前端 Deployment {#creating-the-guestbook-frontend-deployment} -{{< code file="application/guestbook/frontend-deployment.yaml" >}} +{{% code_sample file="application/guestbook/frontend-deployment.yaml" %}} -一些云提供商,如 Google Compute Engine 或 Google Kubernetes Engine, -支持外部负载均衡器。如果你的云提供商支持负载均衡器,并且你希望使用它, +Google Compute Engine 或 Google Kubernetes Engine +这些云平台支持外部负载均衡器。如果你的云平台支持负载均衡器,并且你希望使用它, 只需取消注释 `type: LoadBalancer`。 {{< /note >}} -{{< code file="application/guestbook/frontend-service.yaml" >}} +{{% code_sample file="application/guestbook/frontend-service.yaml" %}} * 完成 [Kubernetes 基础](/zh-cn/docs/tutorials/kubernetes-basics/) 交互式教程 * 使用 Kubernetes 创建一个博客,使用 [MySQL 和 Wordpress 的持久卷](/zh-cn/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/#visit-your-new-wordpress-blog) * 进一步阅读[使用 Service 连接到应用](/zh-cn/docs/tutorials/services/connect-applications-service/) -* 进一步阅读[管理资源](/zh-cn/docs/concepts/cluster-administration/manage-deployment/#using-labels-effectively) +* 进一步阅读[有效使用标签](/zh-cn/docs/concepts/overview/working-with-objects/labels/#using-labels-effectively)