Skip to content

Commit 5888082

Browse files
authored
Merge pull request #20205 from robscott/ingress-blog-post-quotes
Adding quotes to examples in Ingress blog post
2 parents 9654c61 + 3366db7 commit 5888082

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

content/en/blog/_posts/2020-04-02-Improvements-to-the-Ingress-API-in-Kubernetes-1.18.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ The new concept of a path type allows you to specify how a path should be matche
2424
The Ingress resource was designed with simplicity in mind, providing a simple set of fields that would be applicable in all use cases. Over time, as use cases evolved, implementations began to rely on a long list of custom annotations for further configuration. The new `IngressClass` resource provides a way to replace some of those annotations.
2525

2626
Each `IngressClass` specifies which controller should implement Ingresses of the class and can reference a custom resource with additional parameters.
27-
```
28-
apiVersion: networking.k8s.io/v1beta1
29-
kind: IngressClass
27+
```yaml
28+
apiVersion: "networking.k8s.io/v1beta1"
29+
kind: "IngressClass"
3030
metadata:
31-
name: external-lb
31+
name: "external-lb"
3232
spec:
33-
controller: example.com/ingress-controller
33+
controller: "example.com/ingress-controller"
3434
parameters:
35-
apiGroup: k8s.example.com/v1alpha
36-
kind: IngressParameters
37-
name: external-lb
35+
apiGroup: "k8s.example.com/v1alpha"
36+
kind: "IngressParameters"
37+
name: "external-lb"
3838
```
3939
4040
### Specifying the Class of an Ingress
@@ -60,21 +60,21 @@ Many Ingress providers have supported wildcard hostname matching like `*.foo.com
6060
### Putting it All Together
6161
These new Ingress features allow for much more configurability. Here’s an example of an Ingress that makes use of pathType, `ingressClassName`, and a hostname wildcard:
6262

63-
```
64-
apiVersion: networking.k8s.io/v1beta1
65-
kind: Ingress
63+
```yaml
64+
apiVersion: "networking.k8s.io/v1beta1"
65+
kind: "Ingress"
6666
metadata:
67-
name: example-ingress
67+
name: "example-ingress"
6868
spec:
69-
ingressClassName: external-lb
69+
ingressClassName: "external-lb"
7070
rules:
71-
- host: *.example.com
71+
- host: "*.example.com"
7272
http:
7373
paths:
74-
- path: /example
75-
pathType: Prefix
74+
- path: "/example"
75+
pathType: "Prefix"
7676
backend:
77-
serviceName: example-service
77+
serviceName: "example-service"
7878
servicePort: 80
7979
```
8080

0 commit comments

Comments
 (0)