Add a code block fence for example-ingress.yaml.
This commit is contained in:
@@ -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:
|
1. Create `example-ingress.yaml` from the following file:
|
||||||
|
|
||||||
apiVersion: networking.k8s.io/v1beta1
|
```yaml
|
||||||
kind: Ingress
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
metadata:
|
kind: Ingress
|
||||||
name: example-ingress
|
metadata:
|
||||||
annotations:
|
name: example-ingress
|
||||||
nginx.ingress.kubernetes.io/rewrite-target: /$1
|
annotations:
|
||||||
spec:
|
nginx.ingress.kubernetes.io/rewrite-target: /$1
|
||||||
rules:
|
spec:
|
||||||
- host: hello-world.info
|
rules:
|
||||||
http:
|
- host: hello-world.info
|
||||||
paths:
|
http:
|
||||||
- path: /
|
paths:
|
||||||
backend:
|
- path: /
|
||||||
serviceName: web
|
backend:
|
||||||
servicePort: 8080
|
serviceName: web
|
||||||
|
servicePort: 8080
|
||||||
|
```
|
||||||
|
|
||||||
1. Create the Ingress resource by running the following command:
|
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:
|
Output:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
ingress.networking/example-ingress configured
|
ingress.networking/example-ingress configured
|
||||||
```
|
```
|
||||||
@@ -255,6 +258,7 @@ The following file is an Ingress resource that sends traffic to your Service via
|
|||||||
```
|
```
|
||||||
|
|
||||||
Output:
|
Output:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
Hello, world!
|
Hello, world!
|
||||||
Version: 1.0.0
|
Version: 1.0.0
|
||||||
@@ -268,6 +272,7 @@ The following file is an Ingress resource that sends traffic to your Service via
|
|||||||
```
|
```
|
||||||
|
|
||||||
Output:
|
Output:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
Hello, world!
|
Hello, world!
|
||||||
Version: 2.0.0
|
Version: 2.0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user