Skip to content

Commit b02653b

Browse files
authored
Merge pull request #40223 from Zhuzhenghao/pod-v1
[zh] resync page pod-v1
2 parents dd9a6b8 + 8dd1bef commit b02653b

File tree

1 file changed

+64
-41
lines changed
  • content/zh-cn/docs/reference/kubernetes-api/workload-resources

1 file changed

+64
-41
lines changed

content/zh-cn/docs/reference/kubernetes-api/workload-resources/pod-v1.md

Lines changed: 64 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ PodSpec 是对 Pod 的描述。
499499
- **topologySpreadConstraints.whenUnsatisfiable** (string), required
500500
501501
WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint.
502-
- DoNotSchedule (default) tells the scheduler not to schedule it.
502+
- DoNotSchedule (default) tells the scheduler not to schedule it.
503503
- ScheduleAnyway tells the scheduler to schedule the pod in any location,
504504
but giving higher precedence to topologies that would help reduce the
505505
skew.
@@ -788,7 +788,7 @@ PodSpec 是对 Pod 的描述。
788788
789789
<a name="PodDNSConfig"></a>
790790
<!--
791-
PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.
791+
*PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.*
792792
-->
793793
**PodDNSConfig 定义 Pod 的 DNS 参数,这些参数独立于基于 dnsPolicy 生成的参数。**
794794
@@ -942,13 +942,13 @@ PodSpec 是对 Pod 的描述。
942942
可选:默认为空。每个字段的默认值见类型描述。
943943
944944
<!--
945-
PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.
945+
*PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.*
946946
-->
947947
948948
<a name="PodSecurityContext"></a>
949-
PodSecurityContext 包含 Pod 级别的安全属性和常用容器设置。
950-
一些字段也存在于 `container.securityContext` 中。`container.securityContext`
951-
中的字段值优先于 PodSecurityContext 的字段值。
949+
**PodSecurityContext 包含 Pod 级别的安全属性和常用容器设置。**
950+
**一些字段也存在于 `container.securityContext` 中。`container.securityContext`**
951+
**中的字段值优先于 PodSecurityContext 的字段值。**
952952
953953
<!--
954954
- **securityContext.runAsUser** (int64)
@@ -1052,7 +1052,7 @@ PodSpec 是对 Pod 的描述。
10521052
此 Pod 中的容器使用的 seccomp 选项。注意,`spec.os.name` 为 "windows" 时不能设置此字段。
10531053
10541054
<!--
1055-
SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set.
1055+
*SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set.*
10561056
-->
10571057
10581058
**SeccompProfile 定义 Pod 或容器的 seccomp 配置文件设置。只能设置一个配置文件源。**
@@ -1099,7 +1099,7 @@ PodSpec 是对 Pod 的描述。
10991099
注意,`spec.os.name` 为 "windows" 时不能设置该字段。
11001100
11011101
<!--
1102-
SELinuxOptions are the labels to be applied to the container
1102+
*SELinuxOptions are the labels to be applied to the container*
11031103
-->
11041104
11051105
<a name="SELinuxOptions"></a>
@@ -1151,7 +1151,7 @@ PodSpec 是对 Pod 的描述。
11511151
注意,`spec.os.name` 为 "windows" 时不能设置此字段。
11521152
11531153
<!--
1154-
Sysctl defines a kernel parameter to be set
1154+
*Sysctl defines a kernel parameter to be set*
11551155
-->
11561156
11571157
<a name="Sysctl"></a>
@@ -1189,7 +1189,7 @@ PodSpec 是对 Pod 的描述。
11891189
注意,`spec.os.name` 为 "linux" 时不能设置该字段。
11901190
11911191
<!--
1192-
WindowsSecurityContextOptions contain Windows-specific options and credentials.
1192+
*WindowsSecurityContextOptions contain Windows-specific options and credentials.*
11931193
-->
11941194
11951195
<a name="WindowsSecurityContextOptions"></a>
@@ -1350,19 +1350,17 @@ PodSpec 是对 Pod 的描述。
13501350
是 PodResourceClaim.name。如果串接起来的名称对于 ResourceClaim
13511351
无效(例如太长),Pod 的验证机制将拒绝该 Pod。
13521352
1353-
<!--
1354-
An existing ResourceClaim with that name that is not owned by the pod will not be used for the pod to avoid using an unrelated resource by mistake. Scheduling and pod startup are then blocked until the unrelated ResourceClaim is removed.
1355-
-->
1356-
1357-
不属于此 Pod 但与此名称重名的现有 ResourceClaim 不会被用于此 Pod,
1358-
以避免错误地使用不相关的资源。Pod 的调度和启动动作会因此而被阻塞,
1359-
直到不相关的 ResourceClaim 被删除。
1353+
<!--
1354+
An existing ResourceClaim with that name that is not owned by the pod will not be used for the pod to avoid using an unrelated resource by mistake. Scheduling and pod startup are then blocked until the unrelated ResourceClaim is removed.
1355+
-->
1356+
不属于此 Pod 但与此名称重名的现有 ResourceClaim 不会被用于此 Pod,
1357+
以避免错误地使用不相关的资源。Pod 的调度和启动动作会因此而被阻塞,
1358+
直到不相关的 ResourceClaim 被删除。
13601359
1361-
<!--
1362-
This field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim.
1363-
-->
1364-
1365-
此字段是不可变更的,创建 ResourceClaim 后控制平面不会对相应的 ResourceClaim 进行任何更改。
1360+
<!--
1361+
This field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim.
1362+
-->
1363+
此字段是不可变更的,创建 ResourceClaim 后控制平面不会对相应的 ResourceClaim 进行任何更改。
13661364
<!--
13671365
- **schedulingGates** ([]PodSchedulingGate)
13681366
@@ -1421,6 +1419,8 @@ PodSpec 是对 Pod 的描述。
14211419
14221420
A single application container that you want to run within a pod.
14231421
1422+
<hr>
1423+
14241424
- **name** (string), required
14251425
14261426
Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
@@ -2063,7 +2063,7 @@ A single application container that you want to run within a pod.
20632063
### 生命周期
20642064
20652065
<!--
2066-
- **lifecycle** (Lifecycle)
2066+
- **lifecycle** (Lifecycle)
20672067
20682068
Actions that the management system should take in response to container lifecycle events. Cannot be updated.
20692069
@@ -2486,6 +2486,14 @@ A single application container that you want to run within a pod.
24862486
然后保持打开并接受数据,直到客户端断开连接,此时 stdin 关闭并保持关闭直到容器重新启动。
24872487
如果此标志为 false,则从 stdin 读取的容器进程将永远不会收到 EOF。默认为 false。
24882488
2489+
<!--
2490+
- **tty** (boolean)
2491+
2492+
Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.
2493+
-->
2494+
- **tty** (boolean)
2495+
这个容器是否应该为自己分配一个 TTY,同时需要设置 `stdin` 为真。默认为 false。
2496+
24892497
## EphemeralContainer {#EphemeralContainer}
24902498
24912499
<!--
@@ -3356,7 +3364,7 @@ EphemeralContainer 是一个临时容器,你可以将其添加到现有 Pod
33563364
中设置,则在 SecurityContext 中指定的值优先。
33573365
33583366
<!--
3359-
### 不允许
3367+
### Not allowed
33603368
-->
33613369
### 不允许
33623370
@@ -3737,6 +3745,9 @@ LifecycleHandler 定义了应在生命周期挂钩中执行的特定操作。
37373745
名称必须是 IANA_SVC_NAME。
37383746
37393747
<a name="IntOrString"></a>
3748+
<!--
3749+
*IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.*
3750+
-->
37403751
**IntOrString 是一种可以保存 int32 或字符串值的类型。在 JSON 或 YAML 编组和解组中使用时,
37413752
会生成或使用内部类型。例如,这允许你拥有一个可以接受名称或数字的 JSON 字段。**
37423753
@@ -4059,7 +4070,7 @@ Pod 亲和性是一组 Pod 间亲和性调度规则。
40594070
## PodAntiAffinity {#PodAntiAffinity}
40604071
40614072
<!--
4062-
Pod affinity is a group of inter pod affinity scheduling rules.
4073+
Pod anti affinity is a group of inter pod anti affinity scheduling rules.
40634074
-->
40644075
Pod 反亲和性是一组 Pod 间反亲和性调度规则。
40654076
@@ -4068,7 +4079,8 @@ Pod 反亲和性是一组 Pod 间反亲和性调度规则。
40684079
<!--
40694080
- **preferredDuringSchedulingIgnoredDuringExecution** ([]WeightedPodAffinityTerm)
40704081
4071-
The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.
4082+
The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.
4083+
40724084
40734085
<a name="WeightedPodAffinityTerm"></a>
40744086
*The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)*
@@ -4164,7 +4176,7 @@ Pod 反亲和性是一组 Pod 间反亲和性调度规则。
41644176
<!--
41654177
- **requiredDuringSchedulingIgnoredDuringExecution** ([]PodAffinityTerm)
41664178
4167-
If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.
4179+
If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.
41684180
41694181
<a name="PodAffinityTerm"></a>
41704182
*Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key <topologyKey> matches that of any node on which a pod of the set of pods is running*
@@ -4579,7 +4591,10 @@ PodStatus 表示有关 Pod 状态的信息。状态内容可能会滞后于系
45794591
- `Failed`:Pod 中的所有容器都已终止,并且至少有一个容器因故障而终止。
45804592
容器要么以非零状态退出,要么被系统终止。
45814593
- `Unknown`:由于某种原因无法获取 Pod 的状态,通常是由于与 Pod 的主机通信时出错。
4582-
4594+
4595+
<!--
4596+
More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase
4597+
-->
45834598
更多信息:
45844599
https://kubernetes.io/zh-cn/docs/concepts/workloads/pods/pod-lifecycle#pod-phase
45854600
@@ -5317,12 +5332,20 @@ PodStatus 表示有关 Pod 状态的信息。状态内容可能会滞后于系
53175332
time 包所提供的许多工厂方法都有包装器。
53185333
53195334
<!--
5320-
- **containerStatuses.state.terminated.finishat** (Time)
5335+
- **containerStatuses.state.terminated.finishedAt** (Time)
5336+
5337+
Time at which the container last terminated
5338+
5339+
<a name="Time"></a>
5340+
*Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.*
5341+
-->
5342+
5343+
- **containerStatuses.state.terminated.finishedAt** (Time)
53215344
53225345
容器上次终止的时间。
53235346
5324-
Time 是 `time.Time` 的包装器,支持正确编组为 YAML 和 JSON。
5325-
time 包所提供的许多工厂方法都有包装器。
5347+
**Time 是 `time.Time` 的包装器,支持正确编组为 YAML 和 JSON。
5348+
time 包所提供的许多工厂方法都有包装器。**
53265349
53275350
<!--
53285351
- **containerStatuses.state.terminated.message** (string)
@@ -5886,7 +5909,7 @@ PodStatus 表示有关 Pod 状态的信息。状态内容可能会滞后于系
58865909
容器上次终止时的退出状态码。
58875910
58885911
<!--
5889-
- **ephemeralContainerStatuses.state.terminated.startedAt** (Time)
5912+
- **ephemeralContainerStatuses.lastState.terminated.startedAt** (Time)
58905913
58915914
Time at which previous execution of the container started
58925915
@@ -5902,7 +5925,7 @@ PodStatus 表示有关 Pod 状态的信息。状态内容可能会滞后于系
59025925
time 包所提供的许多工厂方法都有包装器。
59035926
59045927
<!--
5905-
- **ephemeralContainerStatuses.state.terminated.finishedAt** (Time)
5928+
- **ephemeralContainerStatuses.lastState.terminated.finishedAt** (Time)
59065929
59075930
Time at which the container last terminated
59085931
@@ -5918,15 +5941,15 @@ PodStatus 表示有关 Pod 状态的信息。状态内容可能会滞后于系
59185941
time 包所提供的许多工厂方法都有包装器。
59195942
59205943
<!--
5921-
- **ephemeralContainerStatuses.state.terminated.message** (string)
5944+
- **ephemeralContainerStatuses.lastState.terminated.message** (string)
59225945
59235946
Message regarding the last termination of the container
59245947
5925-
- **ephemeralContainerStatuses.state.terminated.reason** (string)
5948+
- **ephemeralContainerStatuses.lastState.terminated.reason** (string)
59265949
59275950
(brief) reason from the last termination of the container
59285951
5929-
- **ephemeralContainerStatuses.state.terminated.signal** (int32)
5952+
- **ephemeralContainerStatuses.lastState.terminated.signal** (int32)
59305953
59315954
Signal from the last termination of the container
59325955
-->
@@ -5944,7 +5967,7 @@ PodStatus 表示有关 Pod 状态的信息。状态内容可能会滞后于系
59445967
容器上次终止的信号。
59455968
59465969
<!--
5947-
- **ephemeralContainerStatuses.state.waiting** (ContainerStateWaiting)
5970+
- **ephemeralContainerStatuses.lastState.waiting** (ContainerStateWaiting)
59485971
59495972
Details about a waiting container
59505973
@@ -5959,11 +5982,11 @@ PodStatus 表示有关 Pod 状态的信息。状态内容可能会滞后于系
59595982
**ContainerStateWaiting 是容器的等待状态。**
59605983
59615984
<!--
5962-
- **ephemeralContainerStatuses.state.waiting.message** (string)
5985+
- **ephemeralContainerStatuses.lastState.waiting.message** (string)
59635986
59645987
Message regarding why the container is not yet running.
59655988
5966-
- **ephemeralContainerStatuses.state.waiting.reason** (string)
5989+
- **ephemeralContainerStatuses.lastState.waiting.reason** (string)
59675990
59685991
(brief) reason the container is not yet running.
59695992
-->
@@ -6009,7 +6032,7 @@ PodStatus 表示有关 Pod 状态的信息。状态内容可能会滞后于系
60096032
## PodList {#PodList}
60106033
60116034
<!--
6012-
PodList 是 Pod 的列表。
6035+
PodList is a list of Pods.
60136036
-->
60146037
PodList 是 Pod 的列表。
60156038
@@ -6058,7 +6081,7 @@ PodList 是 Pod 的列表。
60586081
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
60596082
60606083
<!--
6061-
## 操作 {#Operations}
6084+
## Operations {#Operations}
60626085
-->
60636086
## 操作 {#Operations}
60646087

0 commit comments

Comments
 (0)