Merge pull request #20205 from robscott/ingress-blog-post-quotes

Adding quotes to examples in Ingress blog post
This commit is contained in:
Kubernetes Prow Robot 2020-04-09 12:37:48 -07:00 committed by GitHub
commit 5888082a2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 17 deletions

View File

@ -24,17 +24,17 @@ The new concept of a path type allows you to specify how a path should be matche
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. 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.
Each `IngressClass` specifies which controller should implement Ingresses of the class and can reference a custom resource with additional parameters. Each `IngressClass` specifies which controller should implement Ingresses of the class and can reference a custom resource with additional parameters.
``` ```yaml
apiVersion: networking.k8s.io/v1beta1 apiVersion: "networking.k8s.io/v1beta1"
kind: IngressClass kind: "IngressClass"
metadata: metadata:
name: external-lb name: "external-lb"
spec: spec:
controller: example.com/ingress-controller controller: "example.com/ingress-controller"
parameters: parameters:
apiGroup: k8s.example.com/v1alpha apiGroup: "k8s.example.com/v1alpha"
kind: IngressParameters kind: "IngressParameters"
name: external-lb name: "external-lb"
``` ```
### Specifying the Class of an Ingress ### Specifying the Class of an Ingress
@ -60,21 +60,21 @@ Many Ingress providers have supported wildcard hostname matching like `*.foo.com
### Putting it All Together ### Putting it All Together
These new Ingress features allow for much more configurability. Heres an example of an Ingress that makes use of pathType, `ingressClassName`, and a hostname wildcard: These new Ingress features allow for much more configurability. Heres an example of an Ingress that makes use of pathType, `ingressClassName`, and a hostname wildcard:
``` ```yaml
apiVersion: networking.k8s.io/v1beta1 apiVersion: "networking.k8s.io/v1beta1"
kind: Ingress kind: "Ingress"
metadata: metadata:
name: example-ingress name: "example-ingress"
spec: spec:
ingressClassName: external-lb ingressClassName: "external-lb"
rules: rules:
- host: *.example.com - host: "*.example.com"
http: http:
paths: paths:
- path: /example - path: "/example"
pathType: Prefix pathType: "Prefix"
backend: backend:
serviceName: example-service serviceName: "example-service"
servicePort: 80 servicePort: 80
``` ```