Skip to content

Commit d14b1d4

Browse files
committed
sync content/zh-cn/docs/concepts/services-networking/ingress.md
Signed-off-by: bzsuni <[email protected]>
1 parent b367e41 commit d14b1d4

File tree

1 file changed

+10
-11
lines changed
  • content/zh-cn/docs/concepts/services-networking

1 file changed

+10
-11
lines changed

content/zh-cn/docs/concepts/services-networking/ingress.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ A minimal Ingress resource example:
142142
一个最小的 Ingress 资源示例:
143143

144144

145-
{{< codenew file="service/networking/minimal-ingress.yaml" >}}
146-
145+
{{% code file="service/networking/minimal-ingress.yaml" %}}
147146
<!--
148147
An Ingress needs `apiVersion`, `kind`, `metadata` and `spec` fields.
149148
The name of an Ingress object must be a valid
@@ -275,7 +274,7 @@ with static assets.
275274
`Resource` 后端与 Service 后端是互斥的,在二者均被设置时会无法通过合法性检查。
276275
`Resource` 后端的一种常见用法是将所有入站数据导向带有静态资产的对象存储后端。
277276

278-
{{< codenew file="service/networking/ingress-resource-backend.yaml" >}}
277+
{{% code file="service/networking/ingress-resource-backend.yaml" %}}
279278

280279
<!--
281280
After creating the Ingress above, you can view it with the following command:
@@ -432,7 +431,7 @@ equal to the suffix of the wildcard rule.
432431
| `*.foo.com` | `baz.bar.foo.com` | 不匹配,通配符仅覆盖了一个 DNS 标签 |
433432
| `*.foo.com` | `foo.com` | 不匹配,通配符仅覆盖了一个 DNS 标签 |
434433

435-
{{< codenew file="service/networking/ingress-wildcard-host.yaml" >}}
434+
{{% code file="service/networking/ingress-wildcard-host.yaml" %}}
436435

437436
<!--
438437
## Ingress class
@@ -448,7 +447,7 @@ Ingress 可以由不同的控制器实现,通常使用不同的配置。
448447
每个 Ingress 应当指定一个类,也就是一个对 IngressClass 资源的引用。
449448
IngressClass 资源包含额外的配置,其中包括应当实现该类的控制器名称。
450449

451-
{{< codenew file="service/networking/external-lb.yaml" >}}
450+
{{% code file="service/networking/external-lb.yaml" %}}
452451

453452
<!--
454453
The `.spec.parameters` field of an IngressClass lets you reference another
@@ -653,7 +652,7 @@ default `IngressClass`:
653652
不过仍然[推荐](https://kubernetes.github.io/ingress-nginx/#i-have-only-one-instance-of-the-ingresss-nginx-controller-in-my-cluster-what-should-i-do)
654653
设置默认的 `IngressClass`。
655654

656-
{{< codenew file="service/networking/default-ingressclass.yaml" >}}
655+
{{% code file="service/networking/default-ingressclass.yaml" %}}
657656

658657
<!--
659658
## Types of Ingress
@@ -671,7 +670,7 @@ There are existing Kubernetes concepts that allow you to expose a single Service
671670
现有的 Kubernetes 概念允许你暴露单个 Service (参见[替代方案](#alternatives))。
672671
你也可以通过指定无规则的**默认后端**来对 Ingress 进行此操作。
673672

674-
{{< codenew file="service/networking/test-ingress.yaml" >}}
673+
{{% code file="service/networking/test-ingress.yaml" %}}
675674

676675
<!--
677676
If you create it using `kubectl apply -f` you should be able to view the state
@@ -722,7 +721,7 @@ It would require an Ingress such as:
722721
-->
723722
这将需要一个如下所示的 Ingress:
724723
725-
{{< codenew file="service/networking/simple-fanout-example.yaml" >}}
724+
{{% code file="service/networking/simple-fanout-example.yaml" %}}
726725
727726
<!--
728727
When you create the Ingress with `kubectl apply -f`:
@@ -790,7 +789,7 @@ the [Host header](https://tools.ietf.org/html/rfc7230#section-5.4).
790789
以下 Ingress 让后台负载均衡器基于
791790
[host 头部字段](https://tools.ietf.org/html/rfc7230#section-5.4)来路由请求。
792791

793-
{{< codenew file="service/networking/name-virtual-host-ingress.yaml" >}}
792+
{{% code file="service/networking/name-virtual-host-ingress.yaml" %}}
794793

795794
<!--
796795
If you create an Ingress resource without any hosts defined in the rules, then any
@@ -809,7 +808,7 @@ and `second.bar.com` to `service3`.
809808
例如,以下 Ingress 会将请求 `first.bar.com` 的流量路由到 `service1`,将请求
810809
`second.bar.com` 的流量路由到 `service2`,而所有其他流量都会被路由到 `service3`
811810

812-
{{< codenew file="service/networking/name-virtual-host-ingress-no-third-host.yaml" >}}
811+
{{% code file="service/networking/name-virtual-host-ingress-no-third-host.yaml" %}}
813812

814813
<!--
815814
### TLS
@@ -868,7 +867,7 @@ section.
868867
因此,`tls` 字段中的 `hosts` 的取值需要与 `rules` 字段中的 `host` 完全匹配。
869868
{{< /note >}}
870869

871-
{{< codenew file="service/networking/tls-example-ingress.yaml" >}}
870+
{{% code file="service/networking/tls-example-ingress.yaml" %}}
872871

873872
<!--
874873
There is a gap between TLS features supported by various Ingress

0 commit comments

Comments
 (0)