Use apiversion networking.k8s.io/v1 for ingress in ZH version
There is a warning deprecation message for kubernetes v1.19: ``` Warning: networking.k8s.io/v1beta1 Ingress is deprecated in v1.19+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress ``` Switched apiversion in the example to `networking.k8s.io/v1`
This commit is contained in:
committed by
Michael Nikitochkin
parent
72f0d1d3ad
commit
5136f8d552
@@ -198,7 +198,7 @@ The following file is an Ingress resource that sends traffic to your Service via
|
|||||||
1. 根据下面的 YAML 创建文件 `example-ingress.yaml`:
|
1. 根据下面的 YAML 创建文件 `example-ingress.yaml`:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: networking.k8s.io/v1beta1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: example-ingress
|
name: example-ingress
|
||||||
@@ -210,9 +210,12 @@ The following file is an Ingress resource that sends traffic to your Service via
|
|||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
serviceName: web
|
service:
|
||||||
servicePort: 8080
|
name: web
|
||||||
|
port:
|
||||||
|
number: 8080
|
||||||
```
|
```
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
@@ -243,8 +246,8 @@ The following file is an Ingress resource that sends traffic to your Service via
|
|||||||
{{< note >}}此操作可能需要几分钟时间。{{< /note >}}
|
{{< note >}}此操作可能需要几分钟时间。{{< /note >}}
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
NAME HOSTS ADDRESS PORTS AGE
|
NAME CLASS HOSTS ADDRESS PORTS AGE
|
||||||
example-ingress hello-world.info 172.17.0.15 80 38s
|
example-ingress <none> hello-world.info 172.17.0.15 80 38s
|
||||||
```
|
```
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
@@ -338,9 +341,12 @@ The following file is an Ingress resource that sends traffic to your Service via
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- path: /v2
|
- path: /v2
|
||||||
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
serviceName: web2
|
service:
|
||||||
servicePort: 8080
|
name: web2
|
||||||
|
port:
|
||||||
|
number: 8080
|
||||||
```
|
```
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
Reference in New Issue
Block a user