Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add zh translation /docs/user-journeys/users/application-developer/in… #16674

Conversation

@tanjunchen
Copy link

commented Oct 3, 2019

…termediate.md

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Remember to delete this note before submitting your pull request.

For pull requests on 1.15 Features: set Milestone to 1.15 and Base Branch to dev-1.15

For pull requests on Chinese localization, set Base Branch to release-1.14

For pull requests on Korean Localization: set Base Branch to dev-1.14-ko.<latest team milestone>

If you need Help on editing and submitting pull requests, visit:
https://kubernetes.io/docs/contribute/start/#improve-existing-content.

If you need Help on choosing which branch to use, visit:
https://kubernetes.io/docs/contribute/start#choose-which-git-branch-to-use.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@tanjunchen

This comment has been minimized.

Copy link
Author

commented Oct 3, 2019

/assign @tengqm

This page assumes that you've experimented with Kubernetes before. At this point, you should have basic experience interacting with a Kubernetes cluster (locally with Minikube, or elsewhere), and using API objects like Deployments to run your applications.<br><br>If not, you should review the {{< link text="Beginner App Developer" url="/docs/user-journeys/users/application-developer/foundational/" >}} topics first.
{{< /note >}} -->
{{< note >}}
阅读此文档前,假设您之前已经使用过 Kubernetes 。此时,您应该拥有与 Kubernetes 集群(本地使用 Minikube 或者其他方式)交互的基本经验,并且使用如 Deployments 这样的 API 对象来运行您的应用程序。<br><br>如果没有请先首先阅读{{< link text="Beginner App Developer" url="/docs/user-journeys/users/application-developer/foundational/" >}}

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
阅读此文档前,假设您之前已经使用过 Kubernetes 。此时,您应该拥有与 Kubernetes 集群(本地使用 Minikube 或者其他方式)交互的基本经验,并且使用如 Deployments 这样的 API 对象来运行您的应用程序。<br><br>如果没有请先首先阅读{{< link text="Beginner App Developer" url="/docs/user-journeys/users/application-developer/foundational/" >}}
阅读此文档前,假设您之前已经使用过 Kubernetes。此时,您应该拥有与 Kubernetes 集群(本地使用 Minikube 或者其他方式)交互的基本经验,并且使用如 Deployments 这样的 API 对象来运行您的应用程序。<br><br>如果没有请先首先阅读{{< link text="初级应用程序开发者" url="/docs/user-journeys/users/application-developer/foundational/" >}}
| **node 无法访问** | 使用新名称,将 Pod(s) 安排到新节点 | Pod(s) 被标记为"未知",c除非强制删除 Node 对象,否则不会重新被安排 |

<!-- In practice, this means that StatefulSets are best suited for scenarios where replicas (Pods) need to coordinate their workloads in a strongly consistent manner. Guaranteeing an identity for each Pod helps avoid {{< link text="split-brain" url="https://en.wikipedia.org/wiki/Split-brain_(computing)" >}} side effects in the case when a node becomes unreachable ({{< link text="network partition" url="https://en.wikipedia.org/wiki/Network_partition" >}}). This makes StatefulSets a great fit for distributed datastores like Cassandra or Elasticsearch. -->
实际上,这意味着 StatefulSets 最适合副本 (Pods) 需要以强一致的方式协调其工作负载的场景。保证每个 Pod 的身份有助于避免 {{< link text="split-brain" url="https://en.wikipedia.org/wiki/Split-brain_(computing)" >}} 副作用节点变得无法访问 ({{< link text="network partition" url="https://en.wikipedia.org/wiki/Network_partition" >}})。这使得 StatefulSets 非常适合分布式数据存储,如 Cassandra 或 Elasticsearch 。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
实际上,这意味着 StatefulSets 最适合副本 (Pods) 需要以强一致的方式协调其工作负载的场景。保证每个 Pod 的身份有助于避免 {{< link text="split-brain" url="https://en.wikipedia.org/wiki/Split-brain_(computing)" >}} 副作用节点变得无法访问 ({{< link text="network partition" url="https://en.wikipedia.org/wiki/Network_partition" >}})。这使得 StatefulSets 非常适合分布式数据存储,如 Cassandra 或 Elasticsearch 。
实际上,这意味着 StatefulSets 最适合副本 (Pods) 需要以强一致的方式协调其工作负载的场景。保证每个 Pod 的身份有助于避免 {{< link text="脑裂" url="https://en.wikipedia.org/wiki/Split-brain_(computing)" >}} 副作用节点变得无法访问 ({{< link text="网络分区" url="https://en.wikipedia.org/wiki/Network_partition" >}})。这使得 StatefulSets 非常适合分布式数据存储,如 Cassandra 或 Elasticsearch 。
<!-- * Logging and monitoring, from applications like `fluentd`
* Network proxy or {{< link text="service mesh" url="https://www.linux.com/news/whats-service-mesh-and-why-do-i-need-one" >}} -->
*`fluentd` 等应用程序进行记录与监控
* 网络代理 或者 {{< link text="service mesh" url="https://www.linux.com/news/whats-service-mesh-and-why-do-i-need-one" >}}

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
* 网络代理 或者 {{< link text="service mesh" url="https://www.linux.com/news/whats-service-mesh-and-why-do-i-need-one" >}}
* 网络代理 或者 {{< link text="服务网格" url="https://www.linux.com/news/whats-service-mesh-and-why-do-i-need-one" >}}
与 Deployments 相比,这些 API 对象是有限的。一旦指定数量的 Pod 成功完成,它们就会停止。

<!-- * **{{< glossary_tooltip text="Jobs" term_id="job" >}}** - You can use these for one-off tasks like running a script or setting up a work queue. These tasks can be executed sequentially or in parallel. These tasks should be relatively independent, as Jobs do not support closely communicating parallel processes. {{< link text="Read more about Job patterns" url="/docs/concepts/workloads/controllers/jobs-run-to-completion/#job-patterns" >}}. -->
* **{{< glossary_tooltip text="Jobs" term_id="job" >}}** -您可以将它们用于一次性任务,例如运行脚本或设置工作队列。这些任务可以顺序执行或并行执行。这些任务应当相对独立,因为 Jobs 不支持并行进程间密切交流。{{< link text="阅读更多关于 Job 模式" url="/docs/concepts/workloads/controllers/jobs-run-to-completion/#job-patterns" >}}。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
* **{{< glossary_tooltip text="Jobs" term_id="job" >}}** -您可以将它们用于一次性任务,例如运行脚本或设置工作队列。这些任务可以顺序执行或并行执行。这些任务应当相对独立,因为 Jobs 不支持并行进程间密切交流。{{< link text="阅读更多关于 Job 模式" url="/docs/concepts/workloads/controllers/jobs-run-to-completion/#job-patterns" >}}。
* **{{< glossary_tooltip text="Jobs" term_id="job" >}}** -您可以将它们用于一次性任务,例如运行脚本或设置工作队列。这些任务可以顺序执行或并行执行。这些任务应当相对独立,因为 Jobs 不支持并行进程间密切交流。{{< link text="阅读更多关于任务模式" url="/docs/concepts/workloads/controllers/jobs-run-to-completion/#job-patterns" >}}。
## 部署生产就绪的工作负载

<!-- The beginner tutorials on this site, such as the {{< link text="Guestbook app" url="/docs/tutorials/stateless-application/guestbook/" >}}, are geared towards getting workloads up and running on your cluster. This prototyping is great for building your intuition around Kubernetes! However, in order to reliably and securely promote your workloads to production, you need to follow some additional best practices. -->
这个网站上的初学者教程,例如{{< link text="Guestbook app" url="/docs/tutorials/stateless-application/guestbook/" >}}, 目的是使工作负载在集群上启动并运行。这种原型设计非常适合在 Kubernetes 周围产生自己的见解!但是,为了可靠、安全地将工作负载推向生产,您需要遵循一些其他的最佳实践。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
这个网站上的初学者教程,例如{{< link text="Guestbook app" url="/docs/tutorials/stateless-application/guestbook/" >}}, 目的是使工作负载在集群上启动并运行。这种原型设计非常适合在 Kubernetes 周围产生自己的见解!但是,为了可靠、安全地将工作负载推向生产,您需要遵循一些其他的最佳实践。
这个网站上的初学者教程,例如{{< link text="留言簿应用" url="/docs/tutorials/stateless-application/guestbook/" >}}, 目的是使工作负载在集群上启动并运行。这种原型设计非常适合在 Kubernetes 周围产生自己的见解!但是,为了可靠、安全地将工作负载推向生产,您需要遵循一些其他的最佳实践。
<!-- * {{< link text="Purely imperative" url="/docs/tutorials/object-management-kubectl/imperative-object-management-command/" >}}
* {{< link text="Imperative with local configuration files" url="/docs/tutorials/object-management-kubectl/imperative-object-management-configuration/" >}} (typically YAML)
* {{< link text="Declarative with local configuration files" url="/docs/tutorials/object-management-kubectl/declarative-object-management-configuration/" >}} (typically YAML) -->
* {{< link text="Purely imperative" url="/docs/tutorials/object-management-kubectl/imperative-object-management-command/" >}}

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
* {{< link text="Purely imperative" url="/docs/tutorials/object-management-kubectl/imperative-object-management-command/" >}}
* {{< link text="完全命令式" url="/docs/tutorials/object-management-kubectl/imperative-object-management-command/" >}}
* {{< link text="Imperative with local configuration files" url="/docs/tutorials/object-management-kubectl/imperative-object-management-configuration/" >}} (typically YAML)
* {{< link text="Declarative with local configuration files" url="/docs/tutorials/object-management-kubectl/declarative-object-management-configuration/" >}} (typically YAML) -->
* {{< link text="Purely imperative" url="/docs/tutorials/object-management-kubectl/imperative-object-management-command/" >}}
* {{< link text="Imperative with local configuration files" url="/docs/tutorials/object-management-kubectl/imperative-object-management-configuration/" >}} (通常为 YAML)

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
* {{< link text="Imperative with local configuration files" url="/docs/tutorials/object-management-kubectl/imperative-object-management-configuration/" >}} (通常为 YAML)
* {{< link text="使用本地配置文件的命令式配置" url="/docs/tutorials/object-management-kubectl/imperative-object-management-configuration/" >}} (通常为 YAML 文件)
* {{< link text="Declarative with local configuration files" url="/docs/tutorials/object-management-kubectl/declarative-object-management-configuration/" >}} (typically YAML) -->
* {{< link text="Purely imperative" url="/docs/tutorials/object-management-kubectl/imperative-object-management-command/" >}}
* {{< link text="Imperative with local configuration files" url="/docs/tutorials/object-management-kubectl/imperative-object-management-configuration/" >}} (通常为 YAML)
* {{< link text="Declarative with local configuration files" url="/docs/tutorials/object-management-kubectl/declarative-object-management-configuration/" >}} (通常为 YAML)

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
* {{< link text="Declarative with local configuration files" url="/docs/tutorials/object-management-kubectl/declarative-object-management-configuration/" >}} (通常为 YAML)
* {{< link text="使用本地配置文件的声明式配置" url="/docs/tutorials/object-management-kubectl/declarative-object-management-configuration/" >}} (通常为 YAML 文件)
* {{< link text="Declarative with local configuration files" url="/docs/tutorials/object-management-kubectl/declarative-object-management-configuration/" >}} (通常为 YAML)

<!-- There are pros and cons to each approach, though the declarative approach (such as `kubectl apply -f`) may be most helpful in production. With this approach, you rely on local YAML files as the source of truth about your desired state. This enables you to version control your configuration, which is helpful for code reviews and audit tracking. -->
虽然声明方法(例如 `kubectl apply -f` )在生产中可能最有用,但每种方法都有利有弊。使用这种方法,您可以依赖本地 YAML 文件作为您所需状态的真实源头。这使您可以对配置进行版本控制,这有助于代码审查和审计跟踪。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
虽然声明方法(例如 `kubectl apply -f` )在生产中可能最有用,但每种方法都有利有弊。使用这种方法,您可以依赖本地 YAML 文件作为您所需状态的真实源头。这使您可以对配置进行版本控制,这有助于代码审查和审计跟踪。
虽然声明式配置(例如 `kubectl apply -f` )在生产中可能最有用,但每种方法都有利有弊。使用这种方法,您可以依赖本地 YAML 文件作为期望状态的来源。这使您可以对配置进行版本控制,这有助于代码审查和审计跟踪。
您可能熟悉*最小特权原则* ---如果您在编写或使用软件时过于宽松,那么折衷的负面影响可能会升级失控。您是否会谨慎地将“sudo”权限分配给您的操作系统上的软件?API服务器是集群真实来源的网关; 它提供端点来读取或修改集群状态。

<!-- You (or your {{< glossary_tooltip text="cluster operator" term_id="cluster-operator" >}}) can lock down API access with the following: -->
您(或您的{{< glossary_tooltip text="集群运算符" term_id="cluster-operator" >}})可以使用以下命令锁定 API 访问权限:

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
您(或您的{{< glossary_tooltip text="集群运算符" term_id="cluster-operator" >}})可以使用以下命令锁定 API 访问权限:
您(或您的{{< glossary_tooltip text="集群管理员" term_id="cluster-operator" >}})可以使用以下命令锁定 API 访问权限:
* **{{< link text="Resource quotas" url="/docs/concepts/policy/resource-quotas/" >}}**, which affect what your team's workloads can use
* **{{< link text="Memory" url="/docs/tasks/configure-pod-container/assign-memory-resource/" >}} and {{< link text="CPU" url="/docs/tasks/configure-pod-container/assign-cpu-resource/" >}} requests**, for a given Pod or container
* **{{< link text="Monitoring" url="/docs/tasks/debug-application-cluster/resource-usage-monitoring/" >}}**, both on the cluster level and the app level -->
* **{{< glossary_tooltip text="Namespaces" term_id="namespace" >}}**, 用于隔离

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
* **{{< glossary_tooltip text="Namespaces" term_id="namespace" >}}**, 用于隔离
* **{{< glossary_tooltip text="命名空间" term_id="namespace" >}}**, 用于隔离
* **{{< link text="Memory" url="/docs/tasks/configure-pod-container/assign-memory-resource/" >}} and {{< link text="CPU" url="/docs/tasks/configure-pod-container/assign-cpu-resource/" >}} requests**, for a given Pod or container
* **{{< link text="Monitoring" url="/docs/tasks/debug-application-cluster/resource-usage-monitoring/" >}}**, both on the cluster level and the app level -->
* **{{< glossary_tooltip text="Namespaces" term_id="namespace" >}}**, 用于隔离
* **{{< link text="Resource quotas" url="/docs/concepts/policy/resource-quotas/" >}}**, 影响团队的工作负载

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
* **{{< link text="Resource quotas" url="/docs/concepts/policy/resource-quotas/" >}}**, 影响团队的工作负载
* **{{< link text="资源配额" url="/docs/concepts/policy/resource-quotas/" >}}**, 影响团队的工作负载
* **{{< link text="Monitoring" url="/docs/tasks/debug-application-cluster/resource-usage-monitoring/" >}}**, both on the cluster level and the app level -->
* **{{< glossary_tooltip text="Namespaces" term_id="namespace" >}}**, 用于隔离
* **{{< link text="Resource quotas" url="/docs/concepts/policy/resource-quotas/" >}}**, 影响团队的工作负载
* **{{< link text="Memory" url="/docs/tasks/configure-pod-container/assign-memory-resource/" >}} and {{< link text="CPU" url="/docs/tasks/configure-pod-container/assign-cpu-resource/" >}} requests**, 对于给定的 Pod 或容器请求

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
* **{{< link text="Memory" url="/docs/tasks/configure-pod-container/assign-memory-resource/" >}} and {{< link text="CPU" url="/docs/tasks/configure-pod-container/assign-cpu-resource/" >}} requests**, 对于给定的 Pod 或容器请求
* **{{< link text="内存" url="/docs/tasks/configure-pod-container/assign-memory-resource/" >}} and {{< link text="CPU" url="/docs/tasks/configure-pod-container/assign-cpu-resource/" >}} requests**, 对于给定的 Pod 或容器请求
* **{{< glossary_tooltip text="Namespaces" term_id="namespace" >}}**, 用于隔离
* **{{< link text="Resource quotas" url="/docs/concepts/policy/resource-quotas/" >}}**, 影响团队的工作负载
* **{{< link text="Memory" url="/docs/tasks/configure-pod-container/assign-memory-resource/" >}} and {{< link text="CPU" url="/docs/tasks/configure-pod-container/assign-cpu-resource/" >}} requests**, 对于给定的 Pod 或容器请求
* **{{< link text="Monitoring" url="/docs/tasks/debug-application-cluster/resource-usage-monitoring/" >}}**, 集群级和应用级

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
* **{{< link text="Monitoring" url="/docs/tasks/debug-application-cluster/resource-usage-monitoring/" >}}**, 集群级和应用级
* **{{< link text="监视" url="/docs/tasks/debug-application-cluster/resource-usage-monitoring/" >}}**, 集群级和应用级
#### kubectl

<!-- `kubectl` is a command-line tool that allows you to easily read or modify your Kubernetes cluster. It provides convenient, short commands for common operations like scaling app instances and getting node info. How does kubectl do this? It's basically just a user-friendly wrapper for making API requests. It's written using {{< link text="client-go" url="https://github.com/kubernetes/client-go/#client-go" >}}, the Go library for the Kubernetes API. -->
`kubectl` 是一个命令行工具,它允许您轻松读取或修改 Kubernetes 集群。它为常见操作(如缩放 app 应用程序实例和获取节点信息)提供了方便快捷的命令。 kubectl 是怎么做到的?它基本上仅仅是一个用于发出 API 请求的用户友好的包装器。它是使用{{< link text="client-go" url="https://github.com/kubernetes/client-go/#client-go" >}}编写的,这是 Kubernetes API 的go库。

This comment has been minimized.

Copy link
@chenrui333

chenrui333 Oct 3, 2019

Member
Suggested change
`kubectl` 是一个命令行工具,它允许您轻松读取或修改 Kubernetes 集群。它为常见操作(如缩放 app 应用程序实例和获取节点信息)提供了方便快捷的命令。 kubectl 是怎么做到的?它基本上仅仅是一个用于发出 API 请求的用户友好的包装器。它是使用{{< link text="client-go" url="https://github.com/kubernetes/client-go/#client-go" >}}编写的,这是 Kubernetes API 的go库
`kubectl` 是一个命令行工具,它允许您轻松读取或修改 Kubernetes 集群。它为常见操作(如缩放 app 应用程序实例和获取节点信息)提供了方便快捷的命令。 kubectl 是怎么做到的?它基本上仅仅是一个用于发出 API 请求的用户友好的包装器。它是使用{{< link text="client-go" url="https://github.com/kubernetes/client-go/#client-go" >}}编写的,这是 Kubernetes API 的 go 库
@tanjunchen tanjunchen force-pushed the tanjunchen:ZH-translation-/docs/user-journeys/users/application-developer/intermediate.md branch from e6ff49c to a6b6644 Oct 4, 2019
@tanjunchen

This comment has been minimized.

Copy link
Author

commented Oct 4, 2019

@chenrui333 Thank you very much for your comments, I will think and modify, thank you

@tanjunchen

This comment has been minimized.

Copy link
Author

commented Oct 4, 2019

Copy link
Member

left a comment

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Oct 7, 2019
@chenrui333

This comment has been minimized.

Copy link
Member

commented Oct 7, 2019

/approve

@markthink

This comment has been minimized.

Copy link
Member

commented Oct 7, 2019

/retest

@tanjunchen tanjunchen force-pushed the tanjunchen:ZH-translation-/docs/user-journeys/users/application-developer/intermediate.md branch from a6b6644 to 7162fff Oct 7, 2019
@k8s-ci-robot k8s-ci-robot removed the lgtm label Oct 7, 2019
Copy link
Member

left a comment

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm label Oct 7, 2019
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Oct 7, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chenrui333, markthink

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 5fbc10d into kubernetes:release-1.14 Oct 7, 2019
6 of 7 checks passed
6 of 7 checks passed
Pages changed 2505 new files uploaded
Details
Header rules 1 header rule processed
Details
Mixed content No mixed content detected
Details
Redirect rules 1 redirect rule processed
Details
cla/linuxfoundation tanjunchen authorized
Details
deploy/netlify Deploy preview ready!
Details
tide In merge pool.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.