Many Ingress providers have supported wildcard hostname matching like *.foo.com matching, but until now the spec assumed an exact FQDN match of the host. IngressClass resource will ensure that new Ingresses without an ingressClassName specified will be assigned this default IngressClass. is-default-class annotation to true on an It’s possible to mark a specific IngressClass as default in a cluster. Although this annotation was never formally defined, it was widely supported by Ingress controllers, and should now be considered formally deprecated. Deprecating the Ingress Class Annotationīefore the IngressClass resource was added in Kubernetes 1.18, a similar concept of Ingress class was often specified with a kubernetes.io/ingress.class annotation on the Ingress. The new IngressClass resource provides a way to replace some of those annotations.Įach IngressClass specifies which controller should implement Ingresses of the class and can reference a custom resource with additional parameters.ĪpiVersion: "/v1beta1" kind: "IngressClass" metadata: name: "external-lb" spec: controller: "/ingress-controller" parameters: apiGroup: "/v1alpha" kind: "IngressParameters" name: "external-lb" Specifying the Class of an IngressĪ new ingressClassName field has been added to the Ingress spec that is used to reference the IngressClass that should be used to implement this Ingress. Over time, as use cases evolved, implementations began to rely on a long list of custom annotations for further configuration. The Ingress resource was designed with simplicity in mind, providing a simple set of fields that would be applicable in all use cases. Matching is case sensitive and done on a path element by element basis.Įxtended Configuration With Ingress Classes Prefix: Matches based on a URL path prefix split by /.Exact: Matches the URL path exactly and with case sensitivity.
Implementations can treat this as a separate pathType or treat it identically to the Prefix or Exact path types. ImplementationSpecific (default): With this path type, matching is up to the controller implementing the IngressClass.
The new concept of a path type allows you to specify how a path should be matched.