Merge pull request #24225 from miry/update-ingress-example-with-new-api-en

[en] Use apiversion networking.k8s.io/v1 for ingress
This commit is contained in:
Kubernetes Prow Robot
2020-09-29 18:23:25 -07:00
committed by GitHub
@@ -133,7 +133,7 @@ The following file is an Ingress resource that sends traffic to your Service via
1. Create `example-ingress.yaml` from the following file: 1. Create `example-ingress.yaml` from the following file:
```yaml ```yaml
apiVersion: networking.k8s.io/v1beta1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: example-ingress name: example-ingress
@@ -145,9 +145,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
``` ```
1. Create the Ingress resource by running the following command: 1. Create the Ingress resource by running the following command:
@@ -171,8 +174,8 @@ The following file is an Ingress resource that sends traffic to your Service via
{{< note >}}This can take a couple of minutes.{{< /note >}} {{< note >}}This can take a couple of minutes.{{< /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
``` ```
1. Add the following line to the bottom of the `/etc/hosts` file. 1. Add the following line to the bottom of the `/etc/hosts` file.
@@ -232,9 +235,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
``` ```
1. Apply the changes: 1. Apply the changes: