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
Add TLS on AWS EKS with Ingress using AWS Load Balancer Controller
- Document how to use AWS Load Balancer Controller with Traefik on EKS
- Add required annotation for internet-facing NLB provisioning
- Fix typo in main TLS guide
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
Copy file name to clipboardExpand all lines: docs/reference/tls-openfaas.md
+64-2Lines changed: 64 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ This guide explains how to obtain TLS certificates for the OpenFaaS Gateway runn
6
6
7
7
* Setup an Ingress Controller
8
8
* Configure cert-manager to obtain a certificate from Let's Encrypt
9
-
* Configure the an Ingress record for the OpenFaaS Gateway
9
+
* Configure an Ingress record for the OpenFaaS Gateway
10
10
11
11
## Pre-requisites
12
12
@@ -26,7 +26,7 @@ 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 Traefik for OpenFaaS, however any Ingress controller will work, or you can use Istio with separate instructions.
29
+
This section covers setting up TLS for OpenFaaS using Traefik as the Ingress Controller, however any Ingress controller will work, or you can use Istio with separate instructions.
30
30
31
31
Install Traefik with Helm:
32
32
@@ -229,6 +229,68 @@ EOF
229
229
230
230
As above, run the `helm upgrade` command to apply the changes.
231
231
232
+
---
233
+
234
+
## AWS EKS with the AWS Load Balancer Controller
235
+
236
+
If you're running on AWS EKS, the [AWS Load Balancer Controller](https://kubernetes-sigs.github.io/aws-load-balancer-controller/) can be used to provision a Network Load Balancer (NLB) for Traefik's LoadBalancer Service. Traefik still acts as the Ingress Controller and handles TLS termination with cert-manager, but the NLB provides the public endpoint.
237
+
238
+
### Install the AWS Load Balancer Controller
239
+
240
+
Follow the [AWS documentation to install the AWS Load Balancer Controller using Helm](https://docs.aws.amazon.com/eks/latest/userguide/lbc-helm.html). The installation guide covers IAM configuration and the controller deployment.
241
+
242
+
See also: [AWS Load Balancer Controller documentation](https://kubernetes-sigs.github.io/aws-load-balancer-controller/)
243
+
244
+
Once installed, verify the controller is running:
245
+
246
+
```sh
247
+
$ kubectl get deployment -n kube-system aws-load-balancer-controller
248
+
249
+
NAME READY UP-TO-DATE AVAILABLE AGE
250
+
aws-load-balancer-controller 2/2 2 2 84s
251
+
```
252
+
253
+
### Install Traefik with the NLB annotation
254
+
255
+
On EKS with the AWS Load Balancer Controller, Traefik's LoadBalancer Service needs the correct annotation so that the controller provisions an internet-facing NLB.
256
+
257
+
Install Traefik using Helm with the required annotation:
The `service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing` annotation ensures the NLB is publicly accessible. Without it, the AWS Load Balancer Controller defaults to an `internal` scheme, which would prevent Let's Encrypt HTTP01 challenges from reaching your cluster.
269
+
270
+
Verify that Traefik is running and has an external address:
3.[Configure TLS for the OpenFaaS gateway](#configure-tls-for-the-openfaas-gateway)
288
+
4. Optionally, [Configure TLS for the OpenFaaS dashboard](#configure-tls-for-the-openfaas-dashboard)
289
+
290
+
### Create DNS records
291
+
292
+
On EKS the `EXTERNAL-IP` field shows a hostname rather than an IP address. Create a **CNAME record** pointing your domain to the NLB hostname instead of an A record.
293
+
232
294
## Verifying the installation
233
295
234
296
First, check that the DNS records you created have taken effect. You can use `nslookup` or `dig` to check that the domain names resolve to the public address of your Ingress Controller's service.
0 commit comments