From 5b493268169bbcb529664273caaafba9eb4c44e4 Mon Sep 17 00:00:00 2001 From: jckling Date: Tue, 10 May 2022 16:34:10 +0800 Subject: [PATCH] modify spaces between Chinese --- .../zh/docs/concepts/overview/components.md | 10 ++++----- .../docs/concepts/overview/kubernetes-api.md | 12 +++++----- .../working-with-objects/annotations.md | 2 +- .../working-with-objects/field-selectors.md | 4 ++-- .../working-with-objects/finalizers.md | 12 +++++----- .../kubernetes-objects.md | 6 ++--- .../overview/working-with-objects/labels.md | 10 ++++----- .../overview/working-with-objects/names.md | 12 +++++----- .../working-with-objects/namespaces.md | 22 +++++++++---------- .../working-with-objects/owners-dependents.md | 16 +++++++------- 10 files changed, 53 insertions(+), 53 deletions(-) diff --git a/content/zh/docs/concepts/overview/components.md b/content/zh/docs/concepts/overview/components.md index c4084b8ae6..cb88373eb7 100644 --- a/content/zh/docs/concepts/overview/components.md +++ b/content/zh/docs/concepts/overview/components.md @@ -62,7 +62,7 @@ for an example control plane setup that runs across multiple machines. 控制平面组件可以在集群中的任何节点上运行。 然而,为了简单起见,设置脚本通常会在同一个计算机上启动所有控制平面组件, 并且不会在此计算机上运行用户容器。 -请参阅 [使用 kubeadm 构建高可用性集群](/zh/docs/setup/production-environment/tools/kubeadm/high-availability/) +请参阅[使用 kubeadm 构建高可用性集群](/zh/docs/setup/production-environment/tools/kubeadm/high-availability/) 中关于跨多机器控制平面设置的示例。 ### kube-apiserver @@ -189,7 +189,7 @@ Containers started by Kubernetes automatically include this DNS server in their ### DNS {#dns} 尽管其他插件都并非严格意义上的必需组件,但几乎所有 Kubernetes 集群都应该 -有 [集群 DNS](/zh/docs/concepts/services-networking/dns-pod-service/), +有[集群 DNS](/zh/docs/concepts/services-networking/dns-pod-service/), 因为很多示例都需要 DNS 服务。 集群 DNS 是一个 DNS 服务器,和环境中的其他 DNS 服务器一起工作,它为 Kubernetes 服务提供 DNS 记录。 @@ -237,7 +237,7 @@ saving container logs to a central log store with search/browsing interface. * Learn about [kube-scheduler](/docs/concepts/scheduling-eviction/kube-scheduler/) * Read etcd's official [documentation](https://etcd.io/docs/) --> -* 进一步了解 [节点](/zh/docs/concepts/architecture/nodes/) -* 进一步了解 [控制器](/zh/docs/concepts/architecture/controller/) +* 进一步了解[节点](/zh/docs/concepts/architecture/nodes/) +* 进一步了解[控制器](/zh/docs/concepts/architecture/controller/) * 进一步了解 [kube-scheduler](/zh/docs/concepts/scheduling-eviction/kube-scheduler/) -* 阅读 etcd 官方 [文档](https://etcd.io/docs/) +* 阅读 etcd 官方[文档](https://etcd.io/docs/) diff --git a/content/zh/docs/concepts/overview/kubernetes-api.md b/content/zh/docs/concepts/overview/kubernetes-api.md index 61acf3f1f1..61cf1a2c2e 100644 --- a/content/zh/docs/concepts/overview/kubernetes-api.md +++ b/content/zh/docs/concepts/overview/kubernetes-api.md @@ -44,7 +44,7 @@ Consider using one of the [client libraries](/docs/reference/using-api/client-li if you are writing an application using the Kubernetes API. --> 如果你正在编写程序来访问 Kubernetes API,可以考虑使用 -[客户端库](/zh/docs/reference/using-api/client-libraries/) 之一。 +[客户端库](/zh/docs/reference/using-api/client-libraries/)之一。 @@ -157,7 +157,7 @@ for the kube-apiserver component. Kubernetes v1.23 提供将其 API 以 OpenAPI v3 形式发布的初始支持;这一功能特性处于 Alpha 状态,默认被禁用。 你可以通过为 kube-apiserver 组件启用 `OpenAPIV3` -[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/) 来启用此 +[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)来启用此 Alpha 特性。 关于 API 版本分级的定义细节,请参阅 -[API 版本参考](/zh/docs/reference/using-api/#api-versioning) 页面。 +[API 版本参考](/zh/docs/reference/using-api/#api-versioning)页面。 -1. 你可以使用 [自定义资源](/zh/docs/concepts/extend-kubernetes/api-extension/custom-resources/) +1. 你可以使用[自定义资源](/zh/docs/concepts/extend-kubernetes/api-extension/custom-resources/) 来以声明式方式定义 API 服务器如何提供你所选择的资源 API。 1. 你也可以选择实现自己的 [聚合层](/zh/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/) @@ -298,9 +298,9 @@ The Kubernetes API can be extended in one of two ways: - 了解如何通过添加你自己的 [CustomResourceDefinition](/zh/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/) 来扩展 Kubernetes API。 -- [控制 Kubernetes API 访问](/zh/docs/concepts/security/controlling-access/) 页面描述了集群如何针对 +- [控制 Kubernetes API 访问](/zh/docs/concepts/security/controlling-access/)页面描述了集群如何针对 API 访问管理身份认证和鉴权。 -- 通过阅读 [API 参考](/zh/docs/reference/kubernetes-api/) 了解 API 端点、资源类型以及示例。 +- 通过阅读 [API 参考](/zh/docs/reference/kubernetes-api/)了解 API 端点、资源类型以及示例。 - 阅读 [API 变更(英文)](https://git.k8s.io/community/contributors/devel/sig-architecture/api_changes.md#readme) 以了解什么是兼容性的变更以及如何变更 API。 diff --git a/content/zh/docs/concepts/overview/working-with-objects/annotations.md b/content/zh/docs/concepts/overview/working-with-objects/annotations.md index 0a40fd3f93..4d2ff7fc6f 100644 --- a/content/zh/docs/concepts/overview/working-with-objects/annotations.md +++ b/content/zh/docs/concepts/overview/working-with-objects/annotations.md @@ -163,5 +163,5 @@ spec: -* 进一步了解 [标签和选择算符](/zh/docs/concepts/overview/working-with-objects/labels/)。 +* 进一步了解[标签和选择算符](/zh/docs/concepts/overview/working-with-objects/labels/)。 diff --git a/content/zh/docs/concepts/overview/working-with-objects/field-selectors.md b/content/zh/docs/concepts/overview/working-with-objects/field-selectors.md index 6defb45228..f5a78976da 100644 --- a/content/zh/docs/concepts/overview/working-with-objects/field-selectors.md +++ b/content/zh/docs/concepts/overview/working-with-objects/field-selectors.md @@ -31,7 +31,7 @@ kubectl get pods --field-selector status.phase=Running Field selectors are essentially resource *filters*. By default, no selectors/filters are applied, meaning that all resources of the specified type are selected. This makes the following `kubectl` queries equivalent: --> {{< note >}} -字段选择器本质上是资源 *过滤器(Filters)*。默认情况下,字段选择器/过滤器是未被应用的, +字段选择器本质上是资源“过滤器(Filters)”。默认情况下,字段选择器/过滤器是未被应用的, 这意味着指定类型的所有资源都会被筛选出来。 这使得以下的两个 `kubectl` 查询是等价的: @@ -81,7 +81,7 @@ As with [label](/docs/concepts/overview/working-with-objects/labels) and other s --> ## 链式选择器 {#chained-selectors} -同 [标签](/zh/docs/concepts/overview/working-with-objects/labels/) 和其他选择器一样, +同[标签](/zh/docs/concepts/overview/working-with-objects/labels/)和其他选择器一样, 字段选择器可以通过使用逗号分隔的列表组成一个选择链。 下面这个 `kubectl` 命令将筛选 `status.phase` 字段不等于 `Running` 同时 `spec.restartPolicy` 字段等于 `Always` 的所有 Pod: diff --git a/content/zh/docs/concepts/overview/working-with-objects/finalizers.md b/content/zh/docs/concepts/overview/working-with-objects/finalizers.md index a5ec9e0108..6a0a784fcf 100644 --- a/content/zh/docs/concepts/overview/working-with-objects/finalizers.md +++ b/content/zh/docs/concepts/overview/working-with-objects/finalizers.md @@ -13,9 +13,9 @@ You can use finalizers to control {{}} to perform specific cleanup tasks before deleting the target resource. --> -你可以通过使用 Finalizers 提醒 {{}} +你可以通过使用 Finalizers 提醒{{}} 在删除目标资源前执行特定的清理任务, -来控制资源的 {{}}。 +来控制资源的{{}}。 ## 属主引用、标签和 Finalizers {#owners-labels-finalizers} -与 {{}} 类似, +与{{}}类似, [属主引用](/zh/concepts/overview/working-with-objects/owners-dependents/) 描述了 Kubernetes 中对象之间的关系,但它们作用不同。 -当一个 {{}} +当一个{{}} 管理类似于 Pod 的对象时,它使用标签来跟踪相关对象组的变化。 例如,当 {{}} 创建一个或多个 Pod 时, Job 控制器会给这些 Pod 应用上标签,并跟踪集群中的具有相同标签的 Pod 的变化。 @@ -121,7 +121,7 @@ longer than expected without being fully deleted. In these situations, you should check finalizers and owner references on the target owner and dependent objects to troubleshoot the cause. --> -Job 控制器还为这些 Pod 添加了 *属主引用*,指向创建 Pod 的 Job。 +Job 控制器还为这些 Pod 添加了“属主引用”,指向创建 Pod 的 Job。 如果你在这些 Pod 运行的时候删除了 Job, Kubernetes 会使用属主引用(而不是标签)来确定集群中哪些 Pod 需要清理。 @@ -153,5 +153,5 @@ Finalizers 通常因为特殊原因被添加到资源上,所以强行删除它 * Read [Using Finalizers to Control Deletion](/blog/2021/05/14/using-finalizers-to-control-deletion/) on the Kubernetes blog. --> -* 在 Kubernetes 博客上阅读 [使用 Finalizers 控制删除](/blog/2021/05/14/using-finalizers-to-control-deletion/)。 +* 在 Kubernetes 博客上阅读[使用 Finalizers 控制删除](/blog/2021/05/14/using-finalizers-to-control-deletion/)。 diff --git a/content/zh/docs/concepts/overview/working-with-objects/kubernetes-objects.md b/content/zh/docs/concepts/overview/working-with-objects/kubernetes-objects.md index aa1bd7ec1a..23afa65eab 100644 --- a/content/zh/docs/concepts/overview/working-with-objects/kubernetes-objects.md +++ b/content/zh/docs/concepts/overview/working-with-objects/kubernetes-objects.md @@ -55,7 +55,7 @@ Kubernetes 对象是 “目标性记录” —— 一旦创建对象,Kubernete [Kubernetes API](/zh/docs/concepts/overview/kubernetes-api)。 比如,当使用 `kubectl` 命令行接口时,CLI 会执行必要的 Kubernetes API 调用, 也可以在程序中使用 -[客户端库](/zh/docs/reference/using-api/client-libraries/) 直接调用 Kubernetes API。 +[客户端库](/zh/docs/reference/using-api/client-libraries/)直接调用 Kubernetes API。 * 了解最重要的 Kubernetes 基本对象,例如 [Pod](/zh/docs/concepts/workloads/pods/)。 -* 了解 Kubernetes 中的 [控制器](/zh/docs/concepts/architecture/controller/)。 +* 了解 Kubernetes 中的[控制器](/zh/docs/concepts/architecture/controller/)。 * [使用 Kubernetes API](/zh/docs/reference/using-api/) 一节解释了一些 API 概念。 diff --git a/content/zh/docs/concepts/overview/working-with-objects/labels.md b/content/zh/docs/concepts/overview/working-with-objects/labels.md index 387c770c67..a1840bacbd 100644 --- a/content/zh/docs/concepts/overview/working-with-objects/labels.md +++ b/content/zh/docs/concepts/overview/working-with-objects/labels.md @@ -40,7 +40,7 @@ and CLIs. Non-identifying information should be recorded using [annotations](/docs/concepts/overview/working-with-objects/annotations/). --> 标签能够支持高效的查询和监听操作,对于用户界面和命令行是很理想的。 -应使用 [注解](/zh/docs/concepts/overview/working-with-objects/annotations/) 记录非识别信息。 +应使用[注解](/zh/docs/concepts/overview/working-with-objects/annotations/)记录非识别信息。 @@ -72,7 +72,7 @@ Example labels: -有一些 [常用标签](/zh/docs/concepts/overview/working-with-objects/common-labels/) 的例子;你可以任意制定自己的约定。 +有一些[常用标签](/zh/docs/concepts/overview/working-with-objects/common-labels/)的例子;你可以任意制定自己的约定。 请记住,标签的 Key 对于给定对象必须是唯一的。 ## 标签选择算符 {#label-selectors} -与 [名称和 UID](/zh/docs/concepts/overview/working-with-objects/names/) 不同, +与[名称和 UID](/zh/docs/concepts/overview/working-with-objects/names/) 不同, 标签不支持唯一性。通常,我们希望许多对象携带相同的标签。 -集群中的每一个对象都有一个 [_名称_](#names) 来标识在同类资源中的唯一性。 +集群中的每一个对象都有一个[_名称_](#names)来标识在同类资源中的唯一性。 每个 Kubernetes 对象也有一个 [_UID_](#uids) 来标识在整个集群中的唯一性。 -比如,在同一个 [名字空间](/zh/docs/concepts/overview/working-with-objects/namespaces/) +比如,在同一个[名字空间](/zh/docs/concepts/overview/working-with-objects/namespaces/) 中有一个名为 `myapp-1234` 的 Pod,但是可以命名一个 Pod 和一个 Deployment 同为 `myapp-1234`。 对于用户提供的非唯一性的属性,Kubernetes 提供了 -[标签(Labels)](/zh/docs/concepts/working-with-objects/labels) 和 -[注解(Annotation)](/zh/docs/concepts/overview/working-with-objects/annotations/) 机制。 +[标签(Labels)](/zh/docs/concepts/working-with-objects/labels)和 +[注解(Annotation)](/zh/docs/concepts/overview/working-with-objects/annotations/)机制。 @@ -69,7 +69,7 @@ This means the name must: DNS 子域名的定义可参见 [RFC 1123](https://tools.ietf.org/html/rfc1123)。 这一要求意味着名称必须满足如下规则: -- 不能超过253个字符 +- 不能超过 253 个字符 - 只能包含小写字母、数字,以及 '-' 和 '.' - 必须以字母数字开头 - 必须以字母数字结尾 @@ -174,6 +174,6 @@ UUIDs 是标准化的,见 ISO/IEC 9834-8 和 ITU-T X.667。 * See the [Identifiers and Names in Kubernetes](https://git.k8s.io/community/contributors/design-proposals/architecture/identifiers.md) design document. --> * 进一步了解 Kubernetes [标签](/zh/docs/concepts/overview/working-with-objects/labels/) -* 参阅 [Kubernetes 标识符和名称](https://git.k8s.io/community/contributors/design-proposals/architecture/identifiers.md) 的设计文档 +* 参阅 [Kubernetes 标识符和名称](https://git.k8s.io/community/contributors/design-proposals/architecture/identifiers.md)的设计文档 diff --git a/content/zh/docs/concepts/overview/working-with-objects/namespaces.md b/content/zh/docs/concepts/overview/working-with-objects/namespaces.md index 8d7deae7d5..62d47ad897 100644 --- a/content/zh/docs/concepts/overview/working-with-objects/namespaces.md +++ b/content/zh/docs/concepts/overview/working-with-objects/namespaces.md @@ -18,7 +18,7 @@ weight: 30 -在 Kubernetes 中,_名字空间(Namespace)_ 提供一种机制,将同一集群中的资源划分为相互隔离的组。 +在 Kubernetes 中,“名字空间(Namespace)”提供一种机制,将同一集群中的资源划分为相互隔离的组。 同一名字空间内的资源名称要唯一,但跨名字空间时没有这个要求。 名字空间作用域仅针对带有名字空间的对象,例如 Deployment、Service 等, 这种作用域对集群访问的对象不适用,例如 StorageClass、Node、PersistentVolume 等。 @@ -49,7 +49,7 @@ resource can only be in one namespace. -名字空间是在多个用户之间划分集群资源的一种方法(通过 [资源配额](/zh/docs/concepts/policy/resource-quotas/))。 +名字空间是在多个用户之间划分集群资源的一种方法(通过[资源配额](/zh/docs/concepts/policy/resource-quotas/))。 不必使用多个名字空间来分隔仅仅轻微不同的资源,例如同一软件的不同版本: -应该使用 {{< glossary_tooltip text="标签" term_id="label" >}} +应该使用{{< glossary_tooltip text="标签" term_id="label" >}} 来区分同一名字空间中的不同资源。 ## 使用名字空间 -名字空间的创建和删除在 [名字空间的管理指南文档](/zh/docs/tasks/administer-cluster/namespaces/) 描述。 +名字空间的创建和删除在[名字空间的管理指南文档](/zh/docs/tasks/administer-cluster/namespaces/)描述。 ## 名字空间和 DNS -当你创建一个 [服务](/zh/docs/concepts/services-networking/service/) 时, +当你创建一个[服务](/zh/docs/concepts/services-networking/service/)时, Kubernetes 会创建一个相应的 [DNS 条目](/zh/docs/concepts/services-networking/dns-pod-service/)。 -通过创建与 [公共顶级域名](https://data.iana.org/TLD/tlds-alpha-by-domain.txt) +通过创建与[公共顶级域名](https://data.iana.org/TLD/tlds-alpha-by-domain.txt) 同名的名字空间,这些名字空间中的服务可以拥有与公共 DNS 记录重叠的、较短的 DNS 名称。 所有名字空间中的负载在执行 DNS 查找时,如果查找的名称没有 [尾部句点](https://datatracker.ietf.org/doc/html/rfc1034#page-8), @@ -224,7 +224,7 @@ persistentVolumes, are not in any namespace. --> 大多数 kubernetes 资源(例如 Pod、Service、副本控制器等)都位于某些名字空间中。 但是名字空间资源本身并不在名字空间中。而且底层资源,例如 -[节点](/zh/docs/concepts/architecture/nodes/) 和持久化卷不属于任何名字空间。 +[节点](/zh/docs/concepts/architecture/nodes/)和持久化卷不属于任何名字空间。 -* 进一步了解 [建立新的名字空间](/zh/docs/tasks/administer-cluster/namespaces/#creating-a-new-namespace)。 -* 进一步了解 [删除名字空间](/zh/docs/tasks/administer-cluster/namespaces/#deleting-a-namespace)。 +* 进一步了解[建立新的名字空间](/zh/docs/tasks/administer-cluster/namespaces/#creating-a-new-namespace)。 +* 进一步了解[删除名字空间](/zh/docs/tasks/administer-cluster/namespaces/#deleting-a-namespace)。 diff --git a/content/zh/docs/concepts/overview/working-with-objects/owners-dependents.md b/content/zh/docs/concepts/overview/working-with-objects/owners-dependents.md index d1d4945294..b7f5d0cb71 100644 --- a/content/zh/docs/concepts/overview/working-with-objects/owners-dependents.md +++ b/content/zh/docs/concepts/overview/working-with-objects/owners-dependents.md @@ -18,9 +18,9 @@ In Kubernetes, some objects are *owners* of other objects. For example, a of their owner. --> -在 Kubernetes 中,一些对象是其他对象的 *属主(Owner)*。 +在 Kubernetes 中,一些对象是其他对象的“属主(Owner)”。 例如,{{}} 是一组 Pod 的属主。 -具有属主的对象是属主的 *附属(Dependent)*。 +具有属主的对象是属主的“附属(Dependent)”。 -属主关系不同于一些资源使用的 [标签和选择算符](/zh/docs/concepts/overview/working-with-objects/labels/) 机制。 +属主关系不同于一些资源使用的[标签和选择算符](/zh/docs/concepts/overview/working-with-objects/labels/)机制。 例如,有一个创建 `EndpointSlice` 对象的 Service, 该 Service 使用标签来让控制平面确定,哪些 `EndpointSlice` 对象属于该 Service。 除开标签,每个代表 Service 所管理的 `EndpointSlice` 都有一个属主引用。 @@ -74,7 +74,7 @@ prevents unauthorized users from delaying owner object deletion. --> 附属对象还有一个 `ownerReferences.blockOwnerDeletion` 字段,该字段使用布尔值, 用于控制特定的附属对象是否可以阻止垃圾收集删除其属主对象。 -如果 {{}}(例如 Deployment 控制器) +如果{{}}(例如 Deployment 控制器) 设置了 `metadata.ownerReferences` 字段的值,Kubernetes 会自动设置 `blockOwnerDeletion` 的值为 `true`。 你也可以手动设置 `blockOwnerDeletion` 字段的值,以控制哪些附属对象会阻止垃圾收集。 @@ -99,7 +99,7 @@ You can check for that kind of Event by running --> 根据设计,kubernetes 不允许跨名字空间指定属主。 名字空间范围的附属可以指定集群范围的或者名字空间范围的属主。 -名字空间范围的属主 **必须** 和该附属处于相同的名字空间。 +名字空间范围的属主**必须**和该附属处于相同的名字空间。 如果名字空间范围的属主和附属不在相同的名字空间,那么该属主引用就会被认为是缺失的, 并且当附属的所有属主引用都被确认不再存在之后,该附属就会被删除。 @@ -150,7 +150,7 @@ specify an orphan deletion policy, Kubernetes adds the `orphan` finalizer so that the controller ignores dependent resources after it deletes the owner object. --> -当你使用 [前台或孤立级联删除](/zh/docs/concepts/architecture/garbage-collection/#cascading-deletion) 时, +当你使用[前台或孤立级联删除](/zh/docs/concepts/architecture/garbage-collection/#cascading-deletion)时, Kubernetes 也会向属主资源添加 Finalizer。 在前台删除中,会添加 `foreground` Finalizer,这样控制器必须在删除了拥有 `ownerReferences.blockOwnerDeletion=true` 的附属资源后,才能删除属主对象。 @@ -165,5 +165,5 @@ Kubernetes 也会向属主资源添加 Finalizer。 * Read the API reference for [object metadata](/docs/reference/kubernetes-api/common-definitions/object-meta/#System). --> * 了解更多关于 [Kubernetes Finalizer](/zh/docs/concepts/overview/working-with-objects/finalizers/)。 -* 了解关于 [垃圾收集](/zh/docs/concepts/architecture/garbage-collection)。 -* 阅读 [对象元数据](/docs/reference/kubernetes-api/common-definitions/object-meta/#System) 的 API 参考文档。 +* 了解关于[垃圾收集](/zh/docs/concepts/architecture/garbage-collection)。 +* 阅读[对象元数据](/docs/reference/kubernetes-api/common-definitions/object-meta/#System)的 API 参考文档。