@@ -240,7 +240,7 @@ in the next version of your backend software, without breaking clients.
240
240
例如,你可以在新版本中更改 Pod 中后端软件公开的端口号,而不会破坏客户端。
241
241
242
242
<!--
243
- The default protocol for Services is
243
+ The default protocol for Services is
244
244
[TCP](/docs/reference/networking/service-protocols/#protocol-tcp); you can also
245
245
use any other [supported protocol](/docs/reference/networking/service-protocols/).
246
246
@@ -284,9 +284,9 @@ For example:
284
284
285
285
例如:
286
286
287
- * 希望在生产环境中使用外部的数据库集群,但测试环境使用自己的数据库。
288
- * 希望服务指向另一个 {{< glossary_tooltip term_id="namespace" >}} 中或其它集群中的服务。
289
- * 你正在将工作负载迁移到 Kubernetes。在评估该方法时,你仅在 Kubernetes 中运行一部分后端。
287
+ * 希望在生产环境中使用外部的数据库集群,但测试环境使用自己的数据库。
288
+ * 希望服务指向另一个 {{< glossary_tooltip term_id="namespace" >}} 中或其它集群中的服务。
289
+ * 你正在将工作负载迁移到 Kubernetes。在评估该方法时,你仅在 Kubernetes 中运行一部分后端。
290
290
291
291
在任何这些场景中,都能够定义没有选择算符的 Service。
292
292
实例 :
@@ -409,7 +409,7 @@ selector will fail due to this constraint. This prevents the Kubernetes API serv
409
409
from being used as a proxy to endpoints the caller may not be authorized to access.
410
410
-->
411
411
Kubernetes API 服务器不允许代理到未被映射至 Pod 上的端点。由于此约束,当 Service
412
- 没有选择算符时,诸如 `kubectl proxy <service-name>` 之类的操作将会失败。这可以防止
412
+ 没有选择算符时,诸如 `kubectl proxy <service-name>` 之类的操作将会失败。这可以防止
413
413
Kubernetes API 服务器被用作调用者可能无权访问的端点的代理。
414
414
{{< /note >}}
415
415
@@ -515,7 +515,7 @@ The same API limit means that you cannot manually update an Endpoints to have mo
515
515
516
516
{{< feature-state for_k8s_version="v1.20" state="stable" >}}
517
517
518
- <!--
518
+ <!--
519
519
The `appProtocol` field provides a way to specify an application protocol for
520
520
each Service port. The value of this field is mirrored by the corresponding
521
521
Endpoints and EndpointSlice objects.
@@ -531,7 +531,6 @@ domain prefixed names such as `mycompany.com/my-custom-protocol`.
531
531
其值可以是 [IANA 标准服务名称](https://www.iana.org/assignments/service-names)
532
532
或以域名为前缀的名称,如 `mycompany.com/my-custom-protocol`。
533
533
534
-
535
534
<!--
536
535
# # Multi-Port Services
537
536
@@ -925,7 +924,7 @@ spec:
925
924
selector:
926
925
app.kubernetes.io/name: MyApp
927
926
ports:
928
- # 默认情况下,为了方便起见,` targetPort` 被设置为与 `port` 字段相同的值。
927
+ # 默认情况下,为了方便起见,` targetPort` 被设置为与 `port` 字段相同的值。
929
928
- port : 80
930
929
targetPort : 80
931
930
# 可选字段
@@ -977,7 +976,7 @@ IP 地址范围。
977
976
(这也与早期的 Kubernetes 版本兼容。)
978
977
979
978
{{< note >}}
980
- <!--
979
+ <!--
981
980
This Service is visible as `<NodeIP>:spec.ports[*].nodePort` and `.spec.clusterIP:spec.ports[*].port`.
982
981
If the `--nodeport-addresses` flag for kube-proxy or the equivalent field
983
982
in the kube-proxy configuration file is set, `<NodeIP>` would be a filtered node IP address (or possibly IP addresses).
@@ -1360,10 +1359,10 @@ you can use the following annotations:
1360
1359
第二个注解指定 Pod 使用哪种协议。对于 HTTPS 和 SSL,ELB 希望 Pod
1361
1360
使用证书通过加密连接对自己进行身份验证。
1362
1361
1363
- HTTP 和 HTTPS 选择第7层代理 :ELB 终止与用户的连接,解析标头,并在转发请求时向
1362
+ HTTP 和 HTTPS 选择第 7 层代理 :ELB 终止与用户的连接,解析标头,并在转发请求时向
1364
1363
` X-Forwarded-For` 标头注入用户的 IP 地址(Pod 仅在连接的另一端看到 ELB 的 IP 地址)。
1365
1364
1366
- TCP 和 SSL 选择第4层代理 :ELB 转发流量而不修改报头。
1365
+ TCP 和 SSL 选择第 4 层代理 :ELB 转发流量而不修改报头。
1367
1366
1368
1367
在某些端口处于安全状态而其他端口未加密的混合使用环境中,可以使用以下注解:
1369
1368
@@ -1474,14 +1473,14 @@ specifies the logical hierarchy you created for your Amazon S3 bucket.
1474
1473
metadata:
1475
1474
name: my-service
1476
1475
annotations:
1477
- service.beta.kubernetes.io/aws-load-balancer-access-log-enabled: "true"
1478
1476
# 指定是否为负载均衡器启用访问日志
1479
- service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval : "60 "
1477
+ service.beta.kubernetes.io/aws-load-balancer-access-log-enabled : "true "
1480
1478
# 发布访问日志的时间间隔。你可以将其设置为 5 分钟或 60 分钟。
1481
- service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name : "my-bucket "
1479
+ service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval : "60 "
1482
1480
# 用来存放访问日志的 Amazon S3 Bucket 名称
1483
- service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix : "my-bucket-prefix/prod "
1481
+ service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name : "my-bucket"
1484
1482
# 你为 Amazon S3 Bucket 所创建的逻辑层次结构,例如 ` my-bucket-prefix/prod`
1483
+ service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix : " my-bucket-prefix/prod"
1485
1484
` ` `
1486
1485
1487
1486
<!--
@@ -1552,7 +1551,7 @@ There are other annotations to manage Classic Elastic Load Balancers that are de
1552
1551
# 由已有的安全组所构成的列表,可以配置到所创建的 ELB 之上。
1553
1552
# 与注解 service.beta.kubernetes.io/aws-load-balancer-extra-security-groups 不同,
1554
1553
# 这一设置会替代掉之前指定给该 ELB 的所有其他安全组,也会覆盖掉为此
1555
- # ELB 所唯一创建的安全组。
1554
+ # ELB 所唯一创建的安全组。
1556
1555
# 此列表中的第一个安全组 ID 被用来作为决策源,以允许入站流量流入目标工作节点
1557
1556
# (包括服务流量和健康检查)。
1558
1557
# 如果多个 ELB 配置了相同的安全组 ID,为工作节点安全组添加的允许规则行只有一个,
@@ -1780,7 +1779,7 @@ In the example below, "`my-service`" can be accessed by clients on "`80.11.12.10
1780
1779
` externalIPs` 不会被 Kubernetes 管理,它属于集群管理员的职责范畴。
1781
1780
1782
1781
根据 Service 的规定,`externalIPs` 可以同任意的 `ServiceType` 来一起指定。
1783
- 在上面的例子中,`my-service` 可以在 "`80.11.12.10:80`"(`externalIP:port`) 上被客户端访问。
1782
+ 在上面的例子中,`my-service` 可以在 "`80.11.12.10:80`"(`externalIP:port`) 上被客户端访问。
1784
1783
1785
1784
` ` ` yaml
1786
1785
apiVersion: v1
@@ -1865,5 +1864,5 @@ For more context:
1865
1864
1866
1865
* [虚拟 IP 和 Service 代理](/zh-cn/docs/reference/networking/virtual-ips/)
1867
1866
* Service API 的 [API 参考](/zh-cn/docs/reference/kubernetes-api/service-resources/service-v1/)
1868
- * Endpoints API 的 [API 参考](/zh-cn/docs/reference/kubernetes-api/service-resources/endpoints-v1/)
1867
+ * Endpoint API 的 [API 参考](/zh-cn/docs/reference/kubernetes-api/service-resources/endpoints-v1/)
1869
1868
* EndpointSlice API 的 [API 参考](/zh-cn/docs/reference/kubernetes-api/service-resources/endpoint-slice-v1/)
0 commit comments