You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update documentation across multiple pages to recommend Traefik
as the default ingress controller instead of ingress-nginx:
- Switch ingress controller references from nginx to Traefik
- Update installation commands to use arkade install traefik2
- Replace nginx-specific annotations with Traefik equivalents
- Update ingressClassName from nginx to traefik
- Add Traefik timeout configuration guide
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
Copy file name to clipboardExpand all lines: docs/architecture/production.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -193,9 +193,7 @@ Whether you need to configure new networking for your OpenFaaS deployments, or i
193
193
194
194
It is recommended that you use an IngressController and TLS so that traffic between your clients and your OpenFaaS Gateway is encrypted.
195
195
196
-
You may already have opinions about what IngressController you want to use, the maintainers like to use Nginx given its broad adoption and relative ubiquity.
197
-
198
-
> See also: [Nginx IngressController](https://github.com/kubernetes/ingress-nginx)
196
+
> See also: [Traefik Proxy](https://doc.traefik.io/traefik/)
199
197
200
198
Heptio Contour also includes automatic retries and additional Ingress extensions which you may find useful:
Copy file name to clipboardExpand all lines: docs/deployment/kubernetes.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ There are three recommended ways to install OpenFaaS and you can pick whatever m
74
74
75
75
#### 1) Deploy the Chart with `arkade` (fastest option)
76
76
77
-
The `arkade install` command installs OpenFaaS using its official helm chart. arkade can also install other important software for OpenFaaS users such as `cert-manager` and `nginx-ingress`. It's the easiest and quickest way to get up and running.
77
+
The `arkade install` command installs OpenFaaS using its official helm chart. arkade can also install other important software for OpenFaaS users such as `cert-manager` and `traefik`. It's the easiest and quickest way to get up and running.
78
78
79
79
You can use [arkade](https://arkade.dev/) to install OpenFaaS to a regular cloud cluster, your laptop, a VM, a Raspberry Pi, or a 64-bit Arm machine.
80
80
@@ -197,7 +197,7 @@ Also, ensure any [default load-balancer timeouts within GKE](https://cloud.googl
197
197
To enable TLS while using Helm, try one of the following references:
198
198
199
199
*[Get TLS for OpenFaaS the easy way with arkade](https://blog.alexellis.io/tls-the-easy-way-with-openfaas-and-k3sup/)
200
-
*[Configure TLS with nginx-ingress and cert-manager](/reference/tls-openfaas)
200
+
*[Configure TLS with Traefik and cert-manager](/reference/tls-openfaas)
201
201
202
202
### Setting an Image Pull Policy for your functions
Copy file name to clipboardExpand all lines: docs/reference/tls-openfaas.md
+21-19Lines changed: 21 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,22 +26,24 @@ If you are running on a local or private network, you can use [inlets-operator](
26
26
27
27
### Set up an Ingress Controller
28
28
29
-
We recommend ingress-nginx for OpenFaaS, however any Ingress controller will work, or you can use Istio with separate instructions.
29
+
We recommend Traefik for OpenFaaS, however any Ingress controller will work, or you can use Istio with separate instructions.
30
30
31
-
To install ingress-nginx, use either the Helm chart, or arkade:
31
+
To install Traefik, use either the Helm chart, or arkade:
32
32
33
33
```sh
34
-
$ arkade install ingress-nginx
34
+
$ arkade install traefik2
35
35
```
36
36
37
-
See also: [ingress-nginx installation](https://kubernetes.github.io/ingress-nginx/deploy/)
37
+
See also: [Traefik installation](https://doc.traefik.io/traefik/getting-started/install-traefik/)
38
38
39
39
40
40
#### Timeouts for synchronous invocations
41
41
42
42
Despite configuring OpenFaaS and your functions for [extended timeouts](/tutorials/expanded-timeouts.md), you may find that your Ingress Controller, Istio Gateway, or Cloud Load Balancer implements its own timeouts on connections. If you think you have everything configured correctly for OpenFaaS, but see a timeout at a very specific number such as 30s or 60s, then check the timeouts on your Ingress Controller or Load Balancer.
43
43
44
-
For Ingress Nginx, to extend a synchronous invocation beyond one minute, add the `nginx.ingress.kubernetes.io/proxy-read-timeout` annotation to your Ingress resource. This annotation is specified in seconds - for example, to extend the timeout to 30 minutes, use `nginx.ingress.kubernetes.io/proxy-read-timeout: "1800"`.
44
+
For Traefik, timeouts are typically configured at the EntryPoint level in the static configuration. See the [expanded timeouts guide](/tutorials/expanded-timeouts.md#load-balancers-ingress-and-service-meshes) for more details on configuring Traefik timeouts.
45
+
46
+
Ingress Nginx is now a retired project and should not be used for new installations. If you are still using Ingress Nginx, to extend a synchronous invocation beyond one minute, add the `nginx.ingress.kubernetes.io/proxy-read-timeout` annotation to your Ingress resource. This annotation is specified in seconds - for example, to extend the timeout to 30 minutes, use `nginx.ingress.kubernetes.io/proxy-read-timeout: "1800"`.
You will need to create an A or CNAME record for your domain, pointing to the public IP address of your Ingress controller.
115
117
116
-
If you created the Ingress Controller with arkade, you'll see a new service in the default namespace called `ingress-nginx-controller`. You can find the public IP address with:
118
+
If you created the Ingress Controller with arkade, you'll see a new service in the kube-system namespace called `traefik. You can find the public IP address with:
117
119
118
120
```sh
119
-
$ kubectl get svc -n default ingress-nginx-controller
Take the IP address from the `EXTERNAL-IP` column and create an A record for your domain in your domain management software, or a CNAME record if you're using AWS EKS, and see a domain name in this field.
@@ -129,18 +131,17 @@ All users should create an entry for: `gateway.example.com` and then OpenFaaS da
129
131
### Configure TLS for the OpenFaaS gateway
130
132
131
133
You can now configure the OpenFaaS gateway to use TLS by setting the following Helm values, you can save them in a file called `tls.yaml`:
If you're using something other than ingress-nginx, then change the `ingressClassName` field accordingly. Note that the `kubernetes.io/ingress.class` annotation is deprecated and should not be used.
163
+
If you're using something other than Traefik, then change the `ingressClassName` field accordingly. Note that the `kubernetes.io/ingress.class` annotation is deprecated and should not be used.
163
164
164
165
The `cert-manager.io/issuer` annotation is used to pick between the staging and production Issuers for Let's Encrypt. If this is your first time working with cert-manager, you may want to use the staging issuer first to avoid running into rate limits if you have something misconfigured.
165
166
167
+
> Note: For extended timeouts beyond Traefik's defaults, see the [expanded timeouts guide](/tutorials/expanded-timeouts.md#load-balancers-ingress-and-service-meshes) for information on configuring Traefik's EntryPoint timeouts.
168
+
166
169
Now upgrade OpenFaaS via helm, use any custom values.yaml files that you have saved from a previous installation:
Copy file name to clipboardExpand all lines: docs/tutorials/expanded-timeouts.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,17 @@ AWS EKS is configured to use an [Elastic Load Balancer (ELB)](https://aws.amazon
86
86
87
87
Google Cloud's various Load Balancer options have their [own configuration options too](https://cloud.google.com/load-balancing/docs/https).
88
88
89
-
For Ingress Nginx, set the `nginx.ingress.kubernetes.io/proxy-read-timeout` annotation to extend the timeout. This annotation is specified in seconds - for example, to extend the timeout to 30 minutes, use `nginx.ingress.kubernetes.io/proxy-read-timeout: "1800"`.
89
+
For Traefik, see [Configuring Traefik timeouts](#configuring-traefik-timeouts) below.
90
+
91
+
Ingress Nginx is now a retired project and should not be used for new installations. If you are still using it, set the `nginx.ingress.kubernetes.io/proxy-read-timeout` annotation to extend the timeout. This annotation is specified in seconds - for example, to extend the timeout to 30 minutes, use `nginx.ingress.kubernetes.io/proxy-read-timeout: "1800"`.
92
+
93
+
### Configuring Traefik timeouts
94
+
95
+
Traefik has two separate sets of timeouts to be aware of:
96
+
97
+
**Client-to-Traefik (EntryPoints)** - configured in the static configuration (CLI flags or Helm values). Controls how long Traefik waits for the client to send a request or receive a response. The key fields are `readTimeout` (default 60s), `writeTimeout` (default 0s) and `idleTimeout` (default 180s). See [EntryPoints - RespondingTimeouts](https://doc.traefik.io/traefik/routing/entrypoints/#respondingtimeouts).
98
+
99
+
**Traefik-to-App (ServersTransport)** - configured in the dynamic configuration using a [ServersTransport CRD](https://doc.traefik.io/traefik/reference/routing-configuration/kubernetes/crd/http/serverstransport/), and referenced via the `traefik.ingress.kubernetes.io/service.serverstransport` annotation on the Ingress. By default there is no timeout on how long Traefik waits for a backend to respond (`responseHeaderTimeout` is 0s). Consider setting `responseHeaderTimeout` to match the gateway's `upstreamTimeout` so that Traefik returns a 504 quickly when a function hangs, rather than waiting indefinitely.
90
100
91
101
Finally, if you need to invoke a function for longer than one of your infrastructure components allows, then you should use an [asynchronous invocation](/reference/async). Asynchronous function invocations bypass these components because they are eventually invoked from the queue-worker, not the Internet. The queue-worker for OpenFaaS Standard will also retry invocations if required.
Use arkade, or [install ingress-nginx manually](https://kubernetes.github.io/ingress-nginx/deploy/).
58
+
Use arkade, or [install Traefik manually](https://doc.traefik.io/traefik/getting-started/install-traefik/).
59
59
60
60
```sh
61
-
arkade install ingress-nginx
61
+
arkade install traefik2
62
62
```
63
63
64
64
## Install OpenFaaS with local Ingress enabled
@@ -77,7 +77,7 @@ ingress:
77
77
serviceName: gateway
78
78
servicePort: 8080
79
79
path: /
80
-
ingressClassName: nginx
80
+
ingressClassName: traefik
81
81
```
82
82
83
83
> Note: if you're migrating from an older version of Kubernetes, the `annotations.kubernetes.io/ingress.class` [annotation is deprecated](https://kubernetes.io/docs/concepts/services-networking/ingress/#deprecated-annotation), use `ingressClassName` instead.
0 commit comments