Skip to content

Commit 0445c38

Browse files
authored
Merge pull request #24225 from miry/update-ingress-example-with-new-api-en
[en] Use apiversion networking.k8s.io/v1 for ingress
2 parents 6a85a07 + 599e1db commit 0445c38

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

content/en/docs/tasks/access-application-cluster/ingress-minikube.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ The following file is an Ingress resource that sends traffic to your Service via
133133
1. Create `example-ingress.yaml` from the following file:
134134

135135
```yaml
136-
apiVersion: networking.k8s.io/v1beta1
136+
apiVersion: networking.k8s.io/v1
137137
kind: Ingress
138138
metadata:
139139
name: example-ingress
@@ -145,9 +145,12 @@ The following file is an Ingress resource that sends traffic to your Service via
145145
http:
146146
paths:
147147
- path: /
148+
pathType: Prefix
148149
backend:
149-
serviceName: web
150-
servicePort: 8080
150+
service:
151+
name: web
152+
port:
153+
number: 8080
151154
```
152155

153156
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
171174
{{< note >}}This can take a couple of minutes.{{< /note >}}
172175

173176
```shell
174-
NAME HOSTS ADDRESS PORTS AGE
175-
example-ingress hello-world.info 172.17.0.15 80 38s
177+
NAME CLASS HOSTS ADDRESS PORTS AGE
178+
example-ingress <none> hello-world.info 172.17.0.15 80 38s
176179
```
177180

178181
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
232235

233236
```yaml
234237
- path: /v2
238+
pathType: Prefix
235239
backend:
236-
serviceName: web2
237-
servicePort: 8080
240+
service:
241+
name: web2
242+
port:
243+
number: 8080
238244
```
239245

240246
1. Apply the changes:

0 commit comments

Comments
 (0)