Merge pull request #22984 from shuuji3/en/tasks/access-application-cluster/ingress-minikube

Add a code block fence for example-ingress.yaml on tasks/access-application-cluster/ingress-minikube
This commit is contained in:
Kubernetes Prow Robot
2020-08-08 05:06:19 -07:00
committed by GitHub
@@ -132,21 +132,23 @@ The following file is an Ingress resource that sends traffic to your Service via
1. Create `example-ingress.yaml` from the following file:
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: example-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
rules:
- host: hello-world.info
http:
paths:
- path: /
backend:
serviceName: web
servicePort: 8080
```yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: example-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
rules:
- host: hello-world.info
http:
paths:
- path: /
backend:
serviceName: web
servicePort: 8080
```
1. Create the Ingress resource by running the following command:
@@ -242,6 +244,7 @@ The following file is an Ingress resource that sends traffic to your Service via
```
Output:
```shell
ingress.networking/example-ingress configured
```
@@ -255,6 +258,7 @@ The following file is an Ingress resource that sends traffic to your Service via
```
Output:
```shell
Hello, world!
Version: 1.0.0
@@ -268,6 +272,7 @@ The following file is an Ingress resource that sends traffic to your Service via
```
Output:
```shell
Hello, world!
Version: 2.0.0