-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
zh-trans:/docs/concepts/overview/working-with-objects/names.md #16812
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
content/zh/docs/concepts/overview/working-with-objects/names.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
title: 名称 | ||
content_template: templates/concept | ||
weight: 20 | ||
--- | ||
|
||
{{% capture overview %}} | ||
|
||
<!-- | ||
All objects in the Kubernetes REST API are unambiguously identified by a Name and a UID. | ||
--> | ||
|
||
Kubernetes REST API 中的所有对象都由名称和 UID 明确标识。 | ||
|
||
<!-- | ||
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 UIDs. | ||
--> | ||
|
||
对于非唯一的用户提供的属性,Kubernetes 提供了[标签](/docs/user-guide/labels)和[注释](/docs/concepts/overview/working-with-objects/annotations/)。 | ||
|
||
有关名称和 UID 的精确语法规则,请参见[标识符设计文档](https://git.k8s.io/community/contributors/design-proposals/architecture/identifiers.md)。 | ||
|
||
{{% /capture %}} | ||
|
||
|
||
{{% capture body %}} | ||
|
||
<!-- | ||
## Names1 | ||
--> | ||
|
||
## 名称 | ||
|
||
{{< glossary_definition term_id="name" length="all" >}} | ||
|
||
<!-- | ||
By convention, the names of Kubernetes resources should be up to maximum length of 253 characters and consist of lower case alphanumeric characters, `-`, and `.`, but certain resources have more specific restrictions. | ||
--> | ||
|
||
按照惯例,Kubernetes 资源的名称最大长度应为 253 个字符,由小写字母、数字、`-`和 `.` 组成,但某些资源有更具体的限制。 | ||
|
||
<!-- | ||
For example, here’s the configuration file with a Pod name as `nginx-demo` and a Container name as `nginx`: | ||
--> | ||
|
||
例如,下面是一个配置文件,Pod 名为 `nginx demo`,容器名为 `nginx`: | ||
|
||
```yaml | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: nginx-demo | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx:1.7.9 | ||
ports: | ||
- containerPort: 80 | ||
``` | ||
|
||
## UIDs | ||
|
||
{{< glossary_definition term_id="uid" length="all" >}} | ||
|
||
{{% /capture %}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
title: Name | ||
id: name | ||
date: 2018-04-12 | ||
full_link: /docs/concepts/overview/working-with-objects/names | ||
short_description: > | ||
A client-provided string that refers to an object in a resource URL, such as `/api/v1/pods/some-name`. | ||
|
||
aka: | ||
tags: | ||
- fundamental | ||
--- | ||
<!-- | ||
A client-provided string that refers to an object in a resource URL, such as `/api/v1/pods/some-name`. | ||
--> | ||
|
||
客户端提供的字符串,引用资源 url 中的对象,如`/api/v1/pods/some name`。 | ||
|
||
<!--more--> | ||
|
||
<!-- | ||
Only one object of a given kind can have a given name at a time. However, if you delete the object, you can make a new object with the same name. | ||
--> | ||
|
||
一次只能有一个给定类型的对象具有给定的名称。但是,如果删除对象,则可以创建同名的新对象。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: UID | ||
id: uid | ||
date: 2018-04-12 | ||
full_link: /docs/concepts/overview/working-with-objects/names | ||
short_description: > | ||
A Kubernetes systems-generated string to uniquely identify objects. | ||
|
||
aka: | ||
tags: | ||
- fundamental | ||
--- | ||
<!-- | ||
A Kubernetes systems-generated string to uniquely identify objects. | ||
--> | ||
|
||
Kubernetes 系统生成的字符串,唯一标识对象。 | ||
|
||
<!--more--> | ||
|
||
<!-- | ||
Every object created over the whole lifetime of a Kubernetes cluster has a distinct UID. It is intended to distinguish between historical occurrences of similar entities. | ||
--> | ||
|
||
在 Kubernetes 集群的整个生命周期中创建的每个对象都有一个不同的 uid,它旨在区分类似实体的历史事件。 | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ping035627 have you tried these two links? Seems to be 404?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
英文文档中 /docs/user-guide 目录已经删掉了,该目录下的文件用脚本做了统一转换,/docs/user-guide/labels实际应该是/docs/concepts/overview/working-with-objects/labels,但无论哪个,中文文档中都还没有被翻译,所以肯定访问不了。