Files
PingWang 36f4d27136 zh-trans:/docs/concepts/overview/working-with-objects/names.md (#16812)
Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update /docs/concepts/overview/working-with-objects/names.md

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update some description

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update type

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

add name and uid in /docs/reference/glossary/

Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2019-10-12 02:24:38 -07:00

1.9 KiB
Raw Permalink Blame History

title, content_template, weight
title content_template weight
名称 templates/concept 20

{{% capture overview %}}

Kubernetes REST API 中的所有对象都由名称和 UID 明确标识。

对于非唯一的用户提供的属性,Kubernetes 提供了标签注释

有关名称和 UID 的精确语法规则,请参见标识符设计文档

{{% /capture %}}

{{% capture body %}}

名称

{{< glossary_definition term_id="name" length="all" >}}

按照惯例,Kubernetes 资源的名称最大长度应为 253 个字符,由小写字母、数字、-. 组成,但某些资源有更具体的限制。

例如,下面是一个配置文件,Pod 名为 nginx demo,容器名为 nginx

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 %}}