Skip to content

Commit a91be76

Browse files
authored
Merge pull request #37941 from gaogao101/work38
[zh-cn] Updated namespaces.md
2 parents 3ebf5ee + 0aacedf commit a91be76

File tree

1 file changed

+47
-25
lines changed
  • content/zh-cn/docs/concepts/overview/working-with-objects

1 file changed

+47
-25
lines changed

content/zh-cn/docs/concepts/overview/working-with-objects/namespaces.md

Lines changed: 47 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,50 @@ resources within the same namespace.
6161
应该使用{{< glossary_tooltip text="标签" term_id="label" >}}
6262
来区分同一名字空间中的不同资源。
6363

64+
{{< note >}}
65+
<!--
66+
For a production cluster, consider _not_ using the `default` namespace. Instead, make other namespaces and use those.
67+
-->
68+
对于生产集群,请考虑**不要**使用 `default` 名字空间,而是创建其他名字空间来使用。
69+
{{< /note >}}
70+
71+
<!--
72+
## Initial namespaces
73+
-->
74+
## 初始名字空间 {#initial-namespaces}
75+
76+
<!--
77+
Kubernetes starts with four initial namespaces:
78+
79+
`default`
80+
: Kubernetes includes this namespace so that you can start using your new cluster without first creating a namespace.
81+
82+
`kube-node-lease`
83+
: This namespace holds [Lease](/docs/reference/kubernetes-api/cluster-resources/lease-v1/) objects associated with each node. Node leases allow the kubelet to send [heartbeats](/docs/concepts/architecture/nodes/#heartbeats) so that the control plane can detect node failure.
84+
85+
`kube-public`
86+
: This namespace is readable by *all* clients (including those not authenticated). This namespace is mostly reserved for cluster usage, in case that some resources should be visible and readable publicly throughout the whole cluster. The public aspect of this namespace is only a convention, not a requirement.
87+
88+
`kube-system`
89+
: The namespace for objects created by the Kubernetes system.
90+
-->
91+
Kubernetes 启动时会创建四个初始名字空间:
92+
93+
`default`
94+
: Kubernetes 包含这个名字空间,以便于你无需创建新的名字空间即可开始使用新集群。
95+
96+
`kube-node-lease`
97+
: 该名字空间包含用于与各个节点关联的 [Lease(租约)](/zh-cn/docs/reference/kubernetes-api/cluster-resources/lease-v1/)对象。
98+
节点租约允许 kubelet 发送[心跳](/zh-cn/docs/concepts/architecture/nodes/#heartbeats),由此控制面能够检测到节点故障。
99+
100+
`kube-public`
101+
: **所有**的客户端(包括未经身份验证的客户端)都可以读取该名字空间。
102+
该名字空间主要预留为集群使用,以便某些资源需要在整个集群中可见可读。
103+
该名字空间的公共属性只是一种约定而非要求。
104+
105+
`kube-system`
106+
: 该名字空间用于 Kubernetes 系统创建的对象。
107+
64108
<!--
65109
## Working with Namespaces
66110
@@ -98,28 +142,6 @@ kube-public Active 1d
98142
kube-system Active 1d
99143
```
100144

101-
<!--
102-
Kubernetes starts with four initial namespaces:
103-
104-
* `default` The default namespace for objects with no other namespace
105-
* `kube-system` The namespace for objects created by the Kubernetes system
106-
* `kube-public` This namespace is created automatically and is readable by all users (including those not authenticated). This namespace is mostly reserved for cluster usage, in case that some resources should be visible and readable publicly throughout the whole cluster. The public aspect of this namespace is only a convention, not a requirement.
107-
* `kube-node-lease` This namespace holds [Lease](/docs/reference/kubernetes-api/cluster-resources/lease-v1/)
108-
objects associated with each node. Node leases allow the kubelet to send
109-
[heartbeats](/docs/concepts/architecture/nodes/#heartbeats) so that the control plane
110-
can detect node failure.
111-
-->
112-
Kubernetes 会创建四个初始名字空间:
113-
114-
* `default` 没有指明使用其它名字空间的对象所使用的默认名字空间
115-
* `kube-system` Kubernetes 系统创建对象所使用的名字空间
116-
* `kube-public` 这个名字空间是自动创建的,所有用户(包括未经过身份验证的用户)都可以读取它。
117-
这个名字空间主要用于集群使用,以防某些资源在整个集群中应该是可见和可读的。
118-
这个名字空间的公共方面只是一种约定,而不是要求。
119-
* `kube-node-lease` 此名字空间用于与各个节点相关的
120-
[租约(Lease)](/docs/reference/kubernetes-api/cluster-resources/lease-v1/)对象。
121-
节点租期允许 kubelet 发送[心跳](/zh-cn/docs/concepts/architecture/nodes/#heartbeats),由此控制面能够检测到节点故障。
122-
123145
<!--
124146
### Setting the namespace for a request
125147
@@ -213,7 +235,7 @@ TLDs](https://data.iana.org/TLD/tlds-alpha-by-domain.txt).
213235
{{< /warning >}}
214236

215237
<!--
216-
## Not All Objects are in a Namespace
238+
## Not all objects are in a namespace
217239
-->
218240
## 并非所有对象都在名字空间中 {#not-all-objects-are-in-a-namespace}
219241

@@ -222,11 +244,11 @@ Most Kubernetes resources (e.g. pods, services, replication controllers, and oth
222244
in some namespaces. However namespace resources are not themselves in a namespace.
223245
And low-level resources, such as
224246
[nodes](/docs/concepts/architecture/nodes/) and
225-
persistentVolumes, are not in any namespace.
247+
[persistentVolumes](/docs/concepts/storage/persistent-volumes/), are not in any namespace.
226248
-->
227249
大多数 kubernetes 资源(例如 Pod、Service、副本控制器等)都位于某些名字空间中。
228250
但是名字空间资源本身并不在名字空间中。而且底层资源,
229-
例如[节点](/zh-cn/docs/concepts/architecture/nodes/)和持久化卷不属于任何名字空间
251+
例如[节点](/zh-cn/docs/concepts/architecture/nodes/)[持久化卷](/zh-cn/docs/concepts/storage/persistent-volumes/)不属于任何名字空间
230252

231253
<!--
232254
To see which Kubernetes resources are and aren't in a namespace:

0 commit comments

Comments
 (0)