diff --git a/content/zh-cn/docs/concepts/services-networking/service-traffic-policy.md b/content/zh-cn/docs/concepts/services-networking/service-traffic-policy.md index f822f32eb0..dfe5207336 100644 --- a/content/zh-cn/docs/concepts/services-networking/service-traffic-policy.md +++ b/content/zh-cn/docs/concepts/services-networking/service-traffic-policy.md @@ -1,7 +1,7 @@ --- title: 服务内部流量策略 content_type: concept -weight: 75 +weight: 120 description: >- 如果集群中的两个 Pod 想要通信,并且两个 Pod 实际上都在同一节点运行, **服务内部流量策略** 可以将网络流量限制在该节点内。 @@ -13,7 +13,7 @@ reviewers: - maplain title: Service Internal Traffic Policy content_type: concept -weight: 75 +weight: 120 description: >- If two Pods in your cluster want to communicate, and both Pods are actually running on the same node, _Service Internal Traffic Policy_ to keep network traffic within that node. @@ -24,7 +24,7 @@ description: >- -{{< feature-state for_k8s_version="v1.23" state="beta" >}} +{{< feature-state for_k8s_version="v1.26" state="stable" >}} ## 使用服务内部流量策略 {#using-service-internal-traffic-policy} - -`ServiceInternalTrafficPolicy` -[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/) 是 Beta 功能,默认启用。 -启用该功能后,你就可以通过将 {{< glossary_tooltip text="Service" term_id="service" >}} 的 +你可以通过将 {{< glossary_tooltip text="Service" term_id="service" >}} 的 `.spec.internalTrafficPolicy` 项设置为 `Local`, 来为它指定一个内部专用的流量策略。 -此设置就相当于告诉 kube-proxy 对于集群内部流量只能使用本地的服务端口。 +此设置就相当于告诉 kube-proxy 对于集群内部流量只能使用节点本地的服务端口。 ## 工作原理 {#how-it-works} - kube-proxy 基于 `spec.internalTrafficPolicy` 的设置来过滤路由的目标服务端点。 -当它的值设为 `Local` 时,只选择节点本地的服务端点。 -当它的值设为 `Cluster` 或缺省时,则选择所有的服务端点。 -启用[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/) -`ServiceInternalTrafficPolicy` 后, -`spec.internalTrafficPolicy` 的值默认设为 `Cluster`。 +当它的值设为 `Local` 时,只会选择节点本地的服务端点。 +当它的值设为 `Cluster` 或缺省时,Kubernetes 会选择所有的服务端点。 ## {{% heading "whatsnext" %}} * 请阅读[拓扑感知提示](/zh-cn/docs/concepts/services-networking/topology-aware-hints) * 请阅读 [Service 的外部流量策略](/zh-cn/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip) -* 请阅读[用 Service 连接应用](/zh-cn/docs/concepts/services-networking/connect-applications-service/) +* 遵循[使用 Service 连接到应用](/zh-cn/docs/tutorials/services/connect-applications-service/)教程 \ No newline at end of file