diff --git a/docs/content/providers/kubernetes-ingress.md b/docs/content/providers/kubernetes-ingress.md index c5a855147..e7bb545ed 100644 --- a/docs/content/providers/kubernetes-ingress.md +++ b/docs/content/providers/kubernetes-ingress.md @@ -264,7 +264,33 @@ Otherwise, Ingresses missing the annotation, having an empty value, or with the the new `IngressClass` resource can be leveraged to identify Ingress objects that should be processed. In that case, Traefik will look for an `IngressClass` in the cluster with the controller value equal to *traefik.io/ingress-controller*. - Please see [this article](https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/) for more information. + Please see [this article](https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/) for more information or the example below. + + ```yaml tab="IngressClass" + apiVersion: networking.k8s.io/v1beta1 + kind: IngressClass + metadata: + name: traefik-lb + spec: + controller: traefik.io/ingress-controller + ``` + + ```yaml tab="Ingress" + apiVersion: "networking.k8s.io/v1beta1" + kind: "Ingress" + metadata: + name: "example-ingress" + spec: + ingressClassName: "traefik-lb" + rules: + - host: "*.example.com" + http: + paths: + - path: "/example" + backend: + serviceName: "example-service" + servicePort: 80 + ``` ### `ingressEndpoint`