Traefik Ingress
We officially support the Traefik 2.x Kubernetes ingress controllers. These come in two flavors:
The Traefik documentation may also be useful for crafting advanced annotations to use with this ingress even though it’s not specific to Kubernetes.
Get started
It’s strongly recommended that users setting up Authelia for the first time take a look at our Get started guide. This takes you through various steps which are essential to bootstrapping Authelia.
Variables
Some of the values within this page can automatically be replaced with documentation variables.
Special Notes
Cross-Namespace Resources
Depending on your Traefik version you may be required to configure the allowCrossNamespace to reuse a Middleware from a Namespace different to the Ingress / IngressRoute. Alternatively you can create the Middleware in every Namespace you need to use it.
Middleware
Regardless if you’re using the Traefik Kubernetes Ingress or purely the Traefik Kubernetes CRD, you must configure the Traefik Kubernetes CRD as far as we’re aware at this time in order to configure a ForwardAuth Middleware.
This is an example Middleware manifest. This example assumes that you have deployed an Authelia Pod and you have
configured it to be served on the URL https://auth.example.com
and there is a Kubernetes Service with the name
authelia
in the default
Namespace with TCP port 80
configured to route to the Authelia Pod’s HTTP port and
that your cluster is configured with the default DNS domain name of cluster.local
.
Important Note
The [Middleware] should be applied to an [Ingress] / [IngressRoute] you wish to protect. It SHOULD NOT be applied to the Authelia [Ingress] / [IngressRoute] itself.
Ingress
This is an example Ingress manifest which uses the above Middleware. This example assumes you have an
application you wish to serve on https://app.example.com
and there is a Kubernetes Service with the name app
in
the default
Namespace with TCP port 80
configured to route to the application Pod’s HTTP port.
IngressRoute
This is an example IngressRoute manifest which uses the above Middleware. This example assumes you have
an application you wish to serve on https://app.example.com
and there is a Kubernetes Service with the name app
in
the default
Namespace with TCP port 80
configured to route to the application Pod’s HTTP port.