You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -478,7 +478,9 @@ number of replicas and rolling out updates are more important than controlling e
478
478
the Pod runs on. Use a DaemonSet when it is important that a copy of a Pod always run on
479
479
all or certain hosts, if the DaemonSet provides node-level functionality that allows other Pods to run correctly on that particular node.
480
480
481
-
For example, [network plugins](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/) often include a component that runs as a DaemonSet. The DaemonSet component makes sure that the node where it's running has working cluster networking.
481
+
For example, [network plugins](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/)
482
+
often include a component that runs as a DaemonSet. The DaemonSet component makes sure
483
+
that the node where it's running has working cluster networking.
Copy file name to clipboardExpand all lines: content/zh-cn/docs/concepts/workloads/controllers/deployment.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ A _Deployment_ provides declarative updates for {{< glossary_tooltip text="Pods"
38
38
<!--
39
39
You describe a _desired state_ in a Deployment, and the Deployment {{< glossary_tooltip term_id="controller" >}} changes the actual state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets, or to remove existing Deployments and adopt all their resources with new Deployments.
`.spec.revisionHistoryLimit` is an optional field that specifies the number of old ReplicaSets to retain
2202
-
to allow rollback. These old ReplicaSets consume resources in `etcd` and crowd the output of `kubectl get rs`. The configuration of each Deployment revision is stored in its ReplicaSets; therefore, once an old ReplicaSet is deleted, you lose the ability to rollback to that revision of Deployment. By default, 10 old ReplicaSets will be kept, however its ideal value depends on the frequency and stability of new Deployments.
2202
+
to allow rollback. These old ReplicaSets consume resources in `etcd` and crowd the output of `kubectl get rs`.
2203
+
The configuration of each Deployment revision is stored in its ReplicaSets; therefore, once an old ReplicaSet is deleted,
2204
+
you lose the ability to rollback to that revision of Deployment. By default, 10 old ReplicaSets will be kept,
2205
+
however its ideal value depends on the frequency and stability of new Deployments.
Run the example job by downloading the example file and then running this command:
@@ -384,15 +384,21 @@ Pods may be removed from a ReplicationController's target set by changing their
384
384
<!--
385
385
### Rescheduling
386
386
387
-
As mentioned above, whether you have 1 pod you want to keep running, or 1000, a ReplicationController will ensure that the specified number of pods exists, even in the event of node failure or pod termination (for example, due to an action by another control agent).
387
+
As mentioned above, whether you have 1 pod you want to keep running, or 1000, a
388
+
ReplicationController will ensure that the specified number of pods exists, even
389
+
in the event of node failure or pod termination (for example, due to an action
390
+
by another control agent).
388
391
-->
389
392
### 重新调度 {#rescheduling}
390
393
391
-
如上所述,无论你想要继续运行 1 个 Pod 还是 1000 个 Pod,一个 ReplicationController 都将确保存在指定数量的 Pod,即使在节点故障或 Pod 终止(例如,由于另一个控制代理的操作)的情况下也是如此。
394
+
如上所述,无论你想要继续运行 1 个 Pod 还是 1000 个 Pod,一个
395
+
ReplicationController 都将确保存在指定数量的 Pod,即使在节点故障或
396
+
Pod 终止(例如,由于另一个控制代理的操作)的情况下也是如此。
392
397
<!--
393
398
### Scaling
394
399
395
-
The ReplicationController enables scaling the number of replicas up or down, either manually or by an auto-scaling control agent, by updating the `replicas` field.
400
+
The ReplicationController enables scaling the number of replicas up or down,
401
+
either manually or by an auto-scaling control agent, by updating the `replicas` field.
396
402
-->
397
403
### 扩缩容 {#scaling}
398
404
@@ -419,9 +425,11 @@ Ideally, the rolling update controller would take application readiness into acc
419
425
420
426
The two ReplicationControllers would need to create pods with at least one differentiating label, such as the image tag of the primary container of the pod, since it is typically image updates that motivate rolling updates.
421
427
-->
422
-
理想情况下,滚动更新控制器将考虑应用程序的就绪情况,并确保在任何给定时间都有足够数量的 Pod 有效地提供服务。
428
+
理想情况下,滚动更新控制器将考虑应用程序的就绪情况,并确保在任何给定时间都有足够数量的
429
+
Pod 有效地提供服务。
423
430
424
-
这两个 ReplicationController 将需要创建至少具有一个不同标签的 Pod,比如 Pod 主要容器的镜像标签,因为通常是镜像更新触发滚动更新。
431
+
这两个 ReplicationController 将需要创建至少具有一个不同标签的 Pod,
432
+
比如 Pod 主要容器的镜像标签,因为通常是镜像更新触发滚动更新。
425
433
426
434
<!--
427
435
### Multiple release tracks
@@ -555,7 +563,8 @@ because they are declarative, server-side, and have additional features.
555
563
-->
556
564
### Deployment (推荐)
557
565
558
-
[`Deployment`](/zh-cn/docs/concepts/workloads/controllers/deployment/) 是一种更高级别的 API 对象,用于更新其底层 ReplicaSet 及其 Pod。
Copy file name to clipboardExpand all lines: content/zh-cn/docs/concepts/workloads/pods/_index.md
+35-19Lines changed: 35 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,6 @@ title: Pod
3
3
content_type: concept
4
4
weight: 10
5
5
no_list: true
6
-
card:
7
-
name: concepts
8
-
weight: 60
9
6
---
10
7
<!--
11
8
reviewers:
@@ -14,9 +11,6 @@ title: Pods
14
11
content_type: concept
15
12
weight: 10
16
13
no_list: true
17
-
card:
18
-
name: concepts
19
-
weight: 60
20
14
-->
21
15
22
16
<!-- overview -->
@@ -25,11 +19,13 @@ card:
25
19
_Pods_ are the smallest deployable units of computing that you can create and manage in Kubernetes.
26
20
27
21
A _Pod_ (as in a pod of whales or pea pod) is a group of one or more
28
-
{{< glossary_tooltip text="containers" term_id="container" >}}, with shared storage and network resources, and a specification for how to run the containers. A Pod's contents are always co-located and
22
+
{{< glossary_tooltip text="containers" term_id="container" >}}, with shared storage and network resources,
23
+
and a specification for how to run the containers. A Pod's contents are always co-located and
29
24
co-scheduled, and run in a shared context. A Pod models an
30
25
application-specific "logical host": it contains one or more application
31
26
containers which are relatively tightly coupled.
32
-
In non-cloud contexts, applications executed on the same physical or virtual machine are analogous to cloud applications executed on the same logical host.
27
+
In non-cloud contexts, applications executed on the same physical or virtual machine are
28
+
analogous to cloud applications executed on the same logical host.
33
29
-->
34
30
**Pod** 是可以在 Kubernetes 中创建和管理的、最小的可部署的计算单元。
35
31
@@ -70,7 +66,8 @@ into each node in the cluster so that Pods can run there.
70
66
71
67
<!--
72
68
The shared context of a Pod is a set of Linux namespaces, cgroups, and
73
-
potentially other facets of isolation - the same things that isolate a {{< glossary_tooltip text="container" term_id="container" >}}. Within a Pod's context, the individual applications may have
69
+
potentially other facets of isolation - the same things that isolate a {{< glossary_tooltip text="container" term_id="container" >}}.
70
+
Within a Pod's context, the individual applications may have
74
71
further sub-isolations applied.
75
72
76
73
A Pod is similar to a set of containers with shared namespaces and shared filesystem volumes.
@@ -90,7 +87,7 @@ The following is an example of a Pod which consists of a container running the i
90
87
91
88
下面是一个 Pod 示例,它由一个运行镜像 `nginx:1.14.2` 的容器组成。
92
89
93
-
{{% code file="pods/simple-pod.yaml" %}}
90
+
{{% code_sample file="pods/simple-pod.yaml" %}}
94
91
95
92
<!--
96
93
To create the Pod shown above, run the following command:
@@ -114,7 +111,8 @@ Pod 通常不是直接创建的,而是使用工作负载资源创建的。
114
111
### 用于管理 Pod 的工作负载资源 {#workload-resources-for-managing-pods}
115
112
116
113
<!--
117
-
Usually you don't need to create Pods directly, even singleton Pods. Instead, create them using workload resources such as {{< glossary_tooltip text="Deployment"
114
+
Usually you don't need to create Pods directly, even singleton Pods. Instead,
115
+
create them using workload resources such as {{< glossary_tooltip text="Deployment"
118
116
term_id="deployment" >}} or {{< glossary_tooltip text="Job" term_id="job" >}}.
Some Pods have {{< glossary_tooltip text="init containers" term_id="init-container" >}} as well as {{< glossary_tooltip text="app containers" term_id="app-container" >}}. Init containers run and complete before the app containers are started.
211
-
212
-
Pods natively provide two kinds of shared resources for their constituent containers:
213
-
[networking](#pod-networking) and [storage](#pod-storage).
208
+
Some Pods have {{< glossary_tooltip text="init containers" term_id="init-container" >}}
209
+
as well as {{< glossary_tooltip text="app containers" term_id="app-container" >}}.
210
+
Init containers run and complete before the app containers are started.
214
211
-->
215
212
有些 Pod 具有 {{< glossary_tooltip text="Init 容器" term_id="init-container" >}}和
@@ -539,7 +554,8 @@ Pod 中的容器所看到的系统主机名与为 Pod 配置的 `name` 属性值
539
554
540
555
{{< note >}}
541
556
<!--
542
-
Your {{< glossary_tooltip text="container runtime" term_id="container-runtime" >}} must support the concept of a privileged container for this setting to be relevant.
557
+
Your {{< glossary_tooltip text="container runtime" term_id="container-runtime" >}} must
558
+
support the concept of a privileged container for this setting to be relevant.
0 commit comments