[zh] Fix links in concepts section (6)

This commit is contained in:
Qiming Teng
2020-08-05 14:37:48 +08:00
parent dab8047c85
commit d38315f27b
10 changed files with 562 additions and 559 deletions
@@ -1,5 +1,5 @@
---
title: 对象名称和IDs
title: 对象名称和 IDs
content_type: concept
weight: 20
---
@@ -13,46 +13,32 @@ Every Kubernetes object also has a [_UID_](#uids) that is unique across your who
For example, you can only have one Pod named `myapp-1234` within the same [namespace](/docs/concepts/overview/working-with-objects/namespaces/), but you can have one Pod and one Deployment that are each named `myapp-1234`.
-->
集群中的每一个对象都一个[_名称_](#名称) 来标识在同类资源中的唯一性。
集群中的每一个对象都一个[_名称_](#names) 来标识在同类资源中的唯一性。
每个 Kubernetes 对象也有一个[_UID_](#uids) 来标识在整个集群中的唯一性。
比如,在同一个[namespace](/docs/concepts/overview/working-with-objects/namespaces/)中只能命名一个名为 `myapp-1234` 的 Pod, 但是可以命名一个 Pod 和一个 Deployment 同为 `myapp-1234`.
比如,在同一个[名字空间](/zh/docs/concepts/overview/working-with-objects/namespaces/)
中有一个名为 `myapp-1234` 的 Pod, 但是可以命名一个 Pod 和一个 Deployment 同为 `myapp-1234`.
<!--
For non-unique user-provided attributes, Kubernetes provides [labels](/docs/user-guide/labels) and [annotations](/docs/concepts/overview/working-with-objects/annotations/).
See the [identifiers design doc](https://git.k8s.io/community/contributors/design-proposals/architecture/identifiers.md) for the precise syntax rules for Names and
.
-->
对于非唯一的用户提供的属性,Kubernetes 提供了[标签](/docs/user-guide/labels)和[注释](/docs/concepts/overview/working-with-objects/annotations/)
有关名称和 UID 的精确语法规则,请参见[标识符设计文档](https://git.k8s.io/community/contributors/design-proposals/architecture/identifiers.md)。
对于用户提供的非唯一性的属性,Kubernetes 提供了
[标签(Labels](/zh/docs/concepts/working-with-objects/labels)
[注解(Annotation](/zh/docs/concepts/overview/working-with-objects/annotations/)机制。
<!-- body -->
<!--
## Names
-->
## 名称
## 名称 {#names}
{{< glossary_definition term_id="name" length="all" >}}
<!--
Below are three types of commonly used name constraints for resources.
-->
以下是比较常见的三种资源命名约束。
<!--
@@ -68,9 +54,11 @@ This means the name must:
- end with an alphanumeric character
-->
### DNS 子域名
### DNS 子域名 {#dns-subdomain-names}
某些资源类型需要一个 name 来作为一个 DNS 子域名,见定义 [RFC 1123](https://tools.ietf.org/html/rfc1123)。也就是命名必须满足如下规则:
很多资源类型需要可以用作 DNS 子域名的名称。
DNS 子域名的定义可参见 [RFC 1123](https://tools.ietf.org/html/rfc1123)。
这一要求意味着名称必须满足如下规则:
- 不能超过253个字符
- 只能包含字母数字,以及'-' 和 '.'
@@ -89,10 +77,10 @@ This means the name must:
- start with an alphanumeric character
- end with an alphanumeric character
-->
### DNS 标签名 {#dns-label-names}
### DNS 标签名称
某些资源类型需要其名称遵循 DNS 标签的标准,见[RFC 1123](https://tools.ietf.org/html/rfc1123)。也就是命名必须满足如下规则:
某些资源类型需要其名称遵循 [RFC 1123](https://tools.ietf.org/html/rfc1123)
所定义的 DNS 标签标准。也就是命名必须满足如下规则:
- 最多63个字符
- 只能包含字母数字,以及'-'
@@ -100,19 +88,20 @@ This means the name must:
- 须以字母数字结尾
<!--
### Path Segment Names
Some resource types require their names to be able to be safely encoded as a
path segment. In other words, the name may not be "." or ".." and the name may
not contain "/" or "%".
-->
### 路径分段名称 {#path-segment-names}
### Path 部分名称
一些用与 Path 部分的资源类型要求名称能被安全的 encode。换句话说,其名称不能含有这些字符 "."、".."、"/"或"%"。
某些资源类型要求名称能被安全地用作路径中的片段。
换句话说,其名称不能是 `.``..`,也不可以包含 `/``%` 这些字符。
<!--
Heres an example manifest for a Pod named `nginx-demo`.
-->
下面是一个名为`nginx-demo`的 Pod 的配置清单:
```yaml
@@ -127,16 +116,14 @@ spec:
ports:
- containerPort: 80
```
{{< note >}}
<!--
Some resource types have additional restrictions on their names.
-->
某些资源类型可能有其相应的附加命名约束。
{{< note >}}
某些资源类型可能具有额外的命名约束。
{{< /note >}}
## UIDs
{{< glossary_definition term_id="uid" length="all" >}}
@@ -145,18 +132,16 @@ Some resource types have additional restrictions on their names.
Kubernetes UIDs are universally unique identifiers (also known as UUIDs).
UUIDs are standardized as ISO/IEC 9834-8 and as ITU-T X.667.
-->
Kubernetes UIDs 是通用的唯一标识符 (也叫 UUIDs).
Kubernetes UIDs 是全局唯一标识符也叫 UUIDs)。
UUIDs 是标准化的,见 ISO/IEC 9834-8 和 ITU-T X.667.
## {{% heading "whatsnext" %}}
<!--
* Read about [labels](/docs/concepts/overview/working-with-objects/labels/) in Kubernetes.
* See the [Identifiers and Names in Kubernetes](https://git.k8s.io/community/contributors/design-proposals/architecture/identifiers.md) design document.
-->
* 阅读关于 Kubernetes [labels](/docs/concepts/overview/working-with-objects/labels/)
* 更多参见 [Kubernetes 标识符和名称设计文档](https://git.k8s.io/community/contributors/design-proposals/architecture/identifiers.md).
* 进一步了解 Kubernetes [标签](/zh/docs/concepts/overview/working-with-objects/labels/)
* 参阅 [Kubernetes 标识符和名称](https://git.k8s.io/community/contributors/design-proposals/architecture/identifiers.md)的设计文档