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
- `"ClusterIP"` means a service will only be accessible inside the cluster, via the cluster IP.
241
+
- `"ExternalName"` means a service consists of only a reference to an external name that kubedns or equivalent will return as a CNAME record, with no exposing or proxying of any pods involved.
242
+
- `"LoadBalancer"` means a service will be exposed via an external load balancer (if the cloud provider supports it), in addition to 'NodePort' type.
243
+
- `"NodePort"` means a service will be exposed on one port of every node, in addition to 'ClusterIP' type.
244
+
-->
245
+
246
+
可能的枚举值:
247
+
-`"ClusterIP"` 表示 Service 只能在集群内部通过集群 IP 访问。
248
+
-`"ExternalName"` 表示 Service 仅包含一个对外部名称的引用,kube-dns 或等效组件会将其作为 CNAME 记录返回,
249
+
不涉及任何 Pod 的暴露或代理。
250
+
-`"LoadBalancer"` 表示 Service 将通过外部负载均衡器暴露(如果云提供商支持),
251
+
除了 'NodePort' 类型外。
252
+
-`"NodePort"` 表示 Service 将在每个节点的一个端口上暴露,除了 'ClusterIP' 类型外。
253
+
225
254
-**ipFamilies** ([]string)
226
255
227
256
<!--
@@ -264,6 +293,24 @@ ServiceSpec 描述用户在服务上创建的属性。
264
293
ipFamilies 和 clusterIPs 字段取决于此字段的值。
265
294
更新服务设置类型为 ExternalName 时,此字段将被擦除。
266
295
296
+
<!--
297
+
Possible enum values:
298
+
- `"PreferDualStack"` indicates that this service prefers dual-stack when the cluster is configured for dual-stack. If the cluster is not configured for dual-stack the service will be assigned a single IPFamily. If the IPFamily is not set in service.spec.ipFamilies then the service will be assigned the default IPFamily configured on the cluster
299
+
- `"RequireDualStack"` indicates that this service requires dual-stack. Using IPFamilyPolicyRequireDualStack on a single stack cluster will result in validation errors. The IPFamilies (and their order) assigned to this service is based on service.spec.ipFamilies. If service.spec.ipFamilies was not provided then it will be assigned according to how they are configured on the cluster. If service.spec.ipFamilies has only one entry then the alternative IPFamily will be added by apiserver
300
+
- `"SingleStack"` indicates that this service is required to have a single IPFamily. The IPFamily assigned is based on the default IPFamily used by the cluster or as identified by service.spec.ipFamilies field
301
+
-->
302
+
303
+
可能的枚举值:
304
+
-`"PreferDualStack"` 表示当集群配置为双栈时,此 Service 偏好使用双栈。
305
+
如果集群未配置为双栈,则服务将被分配一个 IP 族。
306
+
如果服务的 `spec.ipFamilies` 中未设置 IP 族,则 Service 将被分配集群上配置的默认 IP 家族。
307
+
-`"RequireDualStack"` 表示此 Service 需要双栈。在单栈集群上使用 IPFamilyPolicyRequireDualStack
308
+
将导致验证错误。分配给此服务的 IP 家族(及其顺序)基于 `service.spec.ipFamilies`。
309
+
如果未提供 `service.spec.ipFamilies`,则根据集群上的配置进行分配。
310
+
如果 `service.spec.ipFamilies` 只有一个条目,则 apiserver 将添加另一个 IP 家族。
311
+
-`"SingleStack"` 表示此 Service 必须只有一个 IP 家族。
312
+
分配的 IP 家族基于集群使用的默认 IP 家族或由 `service.spec.ipFamilies` 字段指定。
313
+
267
314
-**clusterIP** (string)
268
315
269
316
<!--
@@ -337,6 +384,16 @@ ServiceSpec 描述用户在服务上创建的属性。
337
384
启用基于客户端 IP 的会话亲和性。必须是 ClientIP 或 None。默认为 None。更多信息:
请注意,从集群内部发送到 External IP 或 LoadBalancer IP 的流量始终具有 “Cluster” 语义,
403
460
但是从集群内部发送到 NodePort 的客户端需要在选择节点时考虑流量路由策略。
461
+
462
+
<!--
463
+
Possible enum values:
464
+
- `"Cluster"` routes traffic to all endpoints.
465
+
- `"Local"` preserves the source IP of the traffic by routing only to endpoints on the same node as the traffic was received on (dropping the traffic if there are no local endpoints).
466
+
-->
467
+
468
+
可能的枚举值:
469
+
-`"Cluster"` 路由流量到所有端点。
470
+
-`"Local"` 通过仅路由到与接收流量相同的节点上的端点来保留流量的源 IP
471
+
(如果没有本地端点,则丢弃流量)。
404
472
405
473
-**internalTrafficPolicy** (string)
406
474
@@ -412,6 +480,16 @@ ServiceSpec 描述用户在服务上创建的属性。
412
480
如果设置为 “Local”,代理将假定 Pod 只想与在同一节点上的服务端点通信,如果没有本地端点,它将丢弃流量。
413
481
“Cluster” 默认将流量路由到所有端点(可能会根据拓扑和其他特性进行修改)。
414
482
483
+
<!--
484
+
Possible enum values:
485
+
- `"Cluster"` routes traffic to all endpoints.
486
+
- `"Local"` routes traffic only to endpoints on the same node as the client pod (dropping the traffic if there are no local endpoints
487
+
-->
488
+
489
+
可能的枚举值:
490
+
-`"Cluster"` 路由流量到所有端点。
491
+
-`"Local"` 仅将流量路由到与客户端 Pod 位于同一节点上的端点(如果没有本地端点,则丢弃流量)。
492
+
415
493
-**healthCheckNodePort** (int32)
416
494
417
495
<!--
@@ -617,7 +695,7 @@ ServiceStatus 表示 Service 的当前状态。
617
695
*LoadBalancerStatus represents the status of a load-balancer.*
618
696
-->
619
697
620
-
loadBalancer 包含负载均衡器的当前状态(如果存在)。
698
+
`loadBalancer` 包含负载均衡器的当前状态(如果存在)。
621
699
622
700
<aname="LoadBalancerStatus"></a>
623
701
**LoadBalancerStatus 表示负载均衡器的状态。**
@@ -635,7 +713,7 @@ ServiceStatus 表示 Service 的当前状态。
0 commit comments