Skip to content

Commit

Permalink
Merge pull request #43511 from asa3311/sync-zh-71
Browse files Browse the repository at this point in the history
[zh] sync dual-stack ingress-controllers ingress service
  • Loading branch information
k8s-ci-robot authored Oct 16, 2023
2 parents 5773d84 + cf34cfb commit b305662
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 14 deletions.
10 changes: 5 additions & 5 deletions content/zh-cn/docs/concepts/services-networking/dual-stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ These examples demonstrate the behavior of various dual-stack Service configurat
[无头服务](/zh-cn/docs/concepts/services-networking/service/#headless-services)的行为方式
与此相同。)

{{% code file="service/networking/dual-stack-default-svc.yaml" %}}
{{% code_sample file="service/networking/dual-stack-default-svc.yaml" %}}

<!--
1. This Service specification explicitly defines `PreferDualStack` in `.spec.ipFamilyPolicy`. When
Expand Down Expand Up @@ -298,7 +298,7 @@ These examples demonstrate the behavior of various dual-stack Service configurat
* 对于启用了双协议栈的集群,将 `.spec.ipFamilyPolicy` 设置为
`RequireDualStack` 时,其行为与 `PreferDualStack` 相同。

{{% code file="service/networking/dual-stack-preferred-svc.yaml" %}}
{{% code_sample file="service/networking/dual-stack-preferred-svc.yaml" %}}

<!--
1. This Service specification explicitly defines `IPv6` and `IPv4` in `.spec.ipFamilies` as well
Expand All @@ -312,7 +312,7 @@ These examples demonstrate the behavior of various dual-stack Service configurat
`.spec.ClusterIP` 被设置成 IPv6 地址,因为它是 `.spec.ClusterIPs` 数组中的第一个元素,
覆盖其默认值。

{{% code file="service/networking/dual-stack-preferred-ipfamilies-svc.yaml" %}}
{{% code_sample file="service/networking/dual-stack-preferred-ipfamilies-svc.yaml" %}}

<!--
#### Dual-stack defaults on existing Services
Expand All @@ -337,7 +337,7 @@ dual-stack.)
`.spec.ipFamilyPolicy``SingleStack` 并设置 `.spec.ipFamilies`
为服务的当前地址族。

{{% code file="service/networking/dual-stack-default-svc.yaml" %}}
{{% code_sample file="service/networking/dual-stack-default-svc.yaml" %}}

<!--
You can validate this behavior by using kubectl to inspect an existing service.
Expand Down Expand Up @@ -387,7 +387,7 @@ dual-stack.)
并设置 `.spec.ipFamilies` 为第一个服务集群 IP 范围的地址族(通过配置 kube-apiserver 的
`--service-cluster-ip-range` 参数),即使 `.spec.ClusterIP` 的设置值为 `None` 也如此。

{{% code file="service/networking/dual-stack-default-svc.yaml" %}}
{{% code_sample file="service/networking/dual-stack-default-svc.yaml" %}}

<!--
You can validate this behavior by using kubectl to inspect an existing headless service with selectors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,16 @@ Kubernetes 作为一个项目,目前支持和维护

<!--
* [AKS Application Gateway Ingress Controller](https://docs.microsoft.com/azure/application-gateway/tutorial-ingress-controller-add-on-existing?toc=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Faks%2Ftoc.json&bc=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fbread%2Ftoc.json) is an ingress controller that configures the [Azure Application Gateway](https://docs.microsoft.com/azure/application-gateway/overview).
* [Alibaba Cloud MSE Ingress](https://www.alibabacloud.com/help/en/mse/user-guide/overview-of-mse-ingress-gateways) is an ingress controller that configures the [Alibaba Cloud Native Gateway](https://www.alibabacloud.com/help/en/mse/product-overview/cloud-native-gateway-overview?spm=a2c63.p38356.0.0.20563003HJK9is), which is also the commercial version of [Higress](https://github.com/alibaba/higress).
* [Apache APISIX ingress controller](https://github.com/apache/apisix-ingress-controller) is an [Apache APISIX](https://github.com/apache/apisix)-based ingress controller.
* [Avi Kubernetes Operator](https://github.com/vmware/load-balancer-and-ingress-services-for-kubernetes) provides L4-L7 load-balancing using [VMware NSX Advanced Load Balancer](https://avinetworks.com/).
-->
* [AKS 应用程序网关 Ingress 控制器](https://docs.microsoft.com/zh-cn/azure/application-gateway/tutorial-ingress-controller-add-on-existing?toc=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Faks%2Ftoc.json&bc=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fbread%2Ftoc.json)
是一个配置 [Azure 应用程序网关](https://docs.microsoft.com/zh-cn/azure/application-gateway/overview)
的 Ingress 控制器。
* [阿里云 MSE Ingress](https://docs.microsoft.com/azure/application-gateway/tutorial-ingress-controller-add-on-existing?toc=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Faks%2Ftoc.json&bc=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fbread%2Ftoc.json)
是一个 Ingress 控制器,它负责配置[阿里云原生网关](https://www.alibabacloud.com/help/en/mse/product-overview/cloud-native-gateway-overview?spm=a2c63.p38356.0.0.20563003HJK9is)
也是 [Higress](https://github.com/alibaba/higress) 的商业版本。
* [Apache APISIX Ingress 控制器](https://github.com/apache/apisix-ingress-controller)
是一个基于 [Apache APISIX 网关](https://github.com/apache/apisix) 的 Ingress 控制器。
* [Avi Kubernetes Operator](https://github.com/vmware/load-balancer-and-ingress-services-for-kubernetes)
Expand Down Expand Up @@ -97,6 +101,7 @@ Kubernetes 作为一个项目,目前支持和维护
which offers API gateway functionality.
* [HAProxy Ingress](https://haproxy-ingress.github.io/) is an ingress controller for
[HAProxy](https://www.haproxy.org/#desc).
* [Higress](https://github.com/alibaba/higress) is an [Envoy](https://www.envoyproxy.io) based API gateway that can run as an ingress controller.
* The [HAProxy Ingress Controller for Kubernetes](https://github.com/haproxytech/kubernetes-ingress#readme)
is also an ingress controller for [HAProxy](https://www.haproxy.org/#desc).
* [Istio Ingress](https://istio.io/latest/docs/tasks/traffic-management/ingress/kubernetes-ingress/)
Expand All @@ -111,6 +116,8 @@ Kubernetes 作为一个项目,目前支持和维护
Ingress 控制器,能够提供 API 网关功能。
* [HAProxy Ingress](https://haproxy-ingress.github.io/) 是一个针对
[HAProxy](https://www.haproxy.org/#desc) 的 Ingress 控制器。
* [Higress](https://github.com/alibaba/higress) 是一个基于 [Envoy](https://www.envoyproxy.io) 的 API 网关,
可以作为一个 Ingress 控制器运行。
* [用于 Kubernetes 的 HAProxy Ingress 控制器](https://github.com/haproxytech/kubernetes-ingress#readme)
也是一个针对 [HAProxy](https://www.haproxy.org/#desc) 的 Ingress 控制器。
* [Istio Ingress](https://istio.io/latest/zh/docs/tasks/traffic-management/ingress/kubernetes-ingress/)
Expand Down
12 changes: 6 additions & 6 deletions content/zh-cn/docs/concepts/services-networking/ingress.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ Ingress 经常使用注解(Annotations)来配置一些选项,具体取决
查看你所选的 Ingress 控制器的文档,以了解其所支持的注解。

<!--
The Ingress [spec](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status)
The [Ingress spec](/docs/reference/kubernetes-api/service-resources/ingress-v1/#IngressSpec)
has all the information needed to configure a load balancer or proxy server. Most importantly, it
contains a list of rules matched against all incoming requests. Ingress resource only supports rules
for directing HTTP(S) traffic.
-->
Ingress [规约](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status)
[Ingress 规约](/zh-cn/docs/reference/kubernetes-api/service-resources/ingress-v1/#IngressSpec)
提供了配置负载均衡器或者代理服务器所需要的所有信息。
最重要的是,其中包含对所有入站请求进行匹配的规则列表。
Ingress 资源仅支持用于转发 HTTP(S) 流量的规则。
Expand All @@ -187,16 +187,16 @@ should be defined.
There are some ingress controllers, that work without the definition of a
default `IngressClass`. For example, the Ingress-NGINX controller can be
configured with a [flag](https://kubernetes.github.io/ingress-nginx/#what-is-the-flag-watch-ingress-without-class)
`--watch-ingress-without-class`. It is [recommended](https://kubernetes.github.io/ingress-nginx/#i-have-only-one-instance-of-the-ingresss-nginx-controller-in-my-cluster-what-should-i-do) though, to specify the
configured with a [flag](https://kubernetes.github.io/ingress-nginx/user-guide/k8s-122-migration/#what-is-the-flag-watch-ingress-without-class)
`--watch-ingress-without-class`. It is [recommended](https://kubernetes.github.io/ingress-nginx/user-guide/k8s-122-migration/#i-have-only-one-ingress-controller-in-my-cluster-what-should-i-do) though, to specify the
default `IngressClass` as shown [below](#default-ingress-class).
-->
如果 `ingressClassName` 被省略,那么你应该定义一个[默认的 Ingress 类](#default-ingress-class)

有些 Ingress 控制器不需要定义默认的 `IngressClass`。比如:Ingress-NGINX
控制器可以通过[参数](https://kubernetes.github.io/ingress-nginx/#what-is-the-flag-watch-ingress-without-class)
控制器可以通过[参数](https://kubernetes.github.io/ingress-nginx/user-guide/k8s-122-migration/#what-is-the-flag-watch-ingress-without-class)
`--watch-ingress-without-class` 来配置。
不过仍然[推荐](https://kubernetes.github.io/ingress-nginx/#i-have-only-one-instance-of-the-ingresss-nginx-controller-in-my-cluster-what-should-i-do)
不过仍然[推荐](https://kubernetes.github.io/ingress-nginx/user-guide/k8s-122-migration/#i-have-only-one-ingress-controller-in-my-cluster-what-should-i-do)
[下文](#default-ingress-class)所示来设置默认的 `IngressClass`

<!--
Expand Down
8 changes: 5 additions & 3 deletions content/zh-cn/docs/concepts/services-networking/service.md
Original file line number Diff line number Diff line change
Expand Up @@ -732,11 +732,13 @@ Kubernetes Service 类型允许指定你所需要的 Service 类型。

<!--
The `type` field in the Service API is designed as nested functionality - each level
adds to the previous. This is not strictly required on all cloud providers, but
the Kubernetes API design for Service requires it anyway.
adds to the previous. However there is an exception to this nested design. You can
define a `LoadBalancer` Service by
[disabling the load balancer `NodePort` allocation.](/docs/concepts/services-networking/service/#load-balancer-nodeport-allocation)
-->
服务 API 中的 `type` 字段被设计为层层递进的形式 - 每层都建立在前一层的基础上。
并不是所有云平台都作如此严格要求,但 Kubernetes 的 Service API 设计要求满足这一逻辑。
但是,这种层层递进的形式有一个例外。
你可以在定义 `LoadBalancer` 服务时[禁止负载均衡器分配 `NodePort`](/zh-cn/docs/concepts/services-networking/service/#load-balancer-nodeport-allocation)。

<!--
### `type: ClusterIP` {#type-clusterip}
Expand Down

0 comments on commit b305662

Please sign in to comment.