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
Restructure TLS documentation to separate AWS and Gateway API guides
- Split AWS EKS Ingress setup into dedicated guide (tls-aws-ingress.md)
- Add comprehensive Gateway API section to main TLS guide using Envoy Gateway
- Reduce duplication in AWS Gateway API guide by referencing common setup steps
- Update navigation to include new AWS-specific guides
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
The `enableGatewayAPI` flag tells cert-manager to watch for Gateway API resources when solving ACME challenges.
364
-
365
-
### Create a cert-manager Issuer
366
-
367
-
Create an Issuer in the `openfaas` namespace that uses Let's Encrypt with an HTTP-01 challenge. The solver uses `gatewayHTTPRoute` instead of the `ingress` class used in a traditional Ingress-based setup:
The `parentRefs` field points to the Envoy Gateway we'll create in the next step. The referenced Gateway must have a listener on port 80 so that Let's Encrypt can reach the HTTP-01 challenge URL.
396
-
397
-
### Create the Envoy Gateway
398
-
399
-
Create the Envoy Gateway with listeners for both HTTP (for ACME challenges) and HTTPS (for application traffic):
400
-
401
-
```bash
402
-
cat > envoy-gateway.yaml <<EOF
403
-
apiVersion: gateway.networking.k8s.io/v1
404
-
kind: Gateway
405
-
metadata:
406
-
name: openfaas-gateway
407
-
namespace: openfaas
408
-
annotations:
409
-
cert-manager.io/issuer: letsencrypt-prod
410
-
spec:
411
-
gatewayClassName: eg
412
-
listeners:
413
-
- name: http
414
-
port: 80
415
-
protocol: HTTP
416
-
allowedRoutes:
417
-
namespaces:
418
-
from: Same
419
-
- name: gateway
420
-
hostname: "gw.example.com"
421
-
port: 443
422
-
protocol: HTTPS
423
-
allowedRoutes:
424
-
namespaces:
425
-
from: Same
426
-
tls:
427
-
mode: Terminate
428
-
certificateRefs:
429
-
- name: openfaas-gateway-cert
430
-
- name: dashboard
431
-
hostname: "dashboard.example.com"
432
-
port: 443
433
-
protocol: HTTPS
434
-
allowedRoutes:
435
-
namespaces:
436
-
from: Same
437
-
tls:
438
-
mode: Terminate
439
-
certificateRefs:
440
-
- name: openfaas-dashboard-cert
441
-
EOF
442
-
```
443
-
444
-
```bash
445
-
kubectl apply -f envoy-gateway.yaml
446
-
```
447
-
448
-
The `cert-manager.io/issuer` annotation tells cert-manager to automatically create Certificate resources for each HTTPS listener. The certificates will be stored in the Secrets referenced by `certificateRefs`.
449
-
450
-
### Create HTTPRoutes
451
-
452
-
Create an HTTPRoute for the OpenFaaS gateway:
453
-
454
-
```bash
455
-
cat > httproute.yaml <<EOF
456
-
apiVersion: gateway.networking.k8s.io/v1
457
-
kind: HTTPRoute
458
-
metadata:
459
-
name: openfaas-gateway
460
-
namespace: openfaas
461
-
spec:
462
-
parentRefs:
463
-
- name: openfaas-gateway
464
-
hostnames:
465
-
- "gw.example.com"
466
-
rules:
467
-
- matches:
468
-
- path:
469
-
type: PathPrefix
470
-
value: /
471
-
backendRefs:
472
-
- name: gateway
473
-
port: 8080
474
-
EOF
475
-
```
476
-
477
-
```bash
478
-
kubectl apply -f httproute.yaml
479
-
```
480
-
481
-
If you are using the [OpenFaaS Dashboard](/openfaas-pro/dashboard.md), create an additional HTTPRoute:
482
-
483
-
```bash
484
-
cat > httproute-dashboard.yaml <<EOF
485
-
apiVersion: gateway.networking.k8s.io/v1
486
-
kind: HTTPRoute
487
-
metadata:
488
-
name: openfaas-dashboard
489
-
namespace: openfaas
490
-
spec:
491
-
parentRefs:
492
-
- name: openfaas-gateway
493
-
hostnames:
494
-
- "dashboard.example.com"
495
-
rules:
496
-
- matches:
497
-
- path:
498
-
type: PathPrefix
499
-
value: /
500
-
backendRefs:
501
-
- name: dashboard
502
-
port: 8080
503
-
EOF
504
-
```
313
+
1. Install Envoy Gateway and create its GatewayClass
314
+
2. Install cert-manager with Gateway API support
315
+
3. Create a cert-manager Issuer
316
+
4. Create the Envoy Gateway with HTTP and HTTPS listeners
317
+
5. Create HTTPRoutes for the OpenFaaS gateway (and optionally the dashboard)
505
318
506
-
```bash
507
-
kubectl apply -f httproute-dashboard.yaml
508
-
```
319
+
Once the Envoy Gateway, HTTPRoutes, and certificates are configured, continue with the steps below to place an NLB in front of Envoy Gateway.
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.
4
+
5
+
For Gateway API approaches on AWS, see [TLS on AWS with Gateway API](/reference/tls-aws-gateway-api.md).
6
+
7
+
## Pre-requisites
8
+
9
+
* AWS EKS cluster with OpenFaaS installed via Helm
10
+
* A domain name under your control, and access to create A or CNAME records
11
+
12
+
Where you see `example.com` given in an example, replace that with your own domain name.
13
+
14
+
## Install the AWS Load Balancer Controller
15
+
16
+
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.
17
+
18
+
See also: [AWS Load Balancer Controller documentation](https://kubernetes-sigs.github.io/aws-load-balancer-controller/)
19
+
20
+
Once installed, verify the controller is running:
21
+
22
+
```sh
23
+
$ kubectl get deployment -n kube-system aws-load-balancer-controller
24
+
25
+
NAME READY UP-TO-DATE AVAILABLE AGE
26
+
aws-load-balancer-controller 2/2 2 2 84s
27
+
```
28
+
29
+
## Install Traefik with the NLB annotation
30
+
31
+
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.
32
+
33
+
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.
45
+
46
+
Verify that Traefik is running and has an external address:
3.[Configure TLS for the OpenFaaS gateway](/reference/tls-openfaas.md#configure-tls-for-the-openfaas-gateway)
64
+
4. Optionally, [Configure TLS for the OpenFaaS dashboard](/reference/tls-openfaas.md#configure-tls-for-the-openfaas-dashboard)
65
+
66
+
## Create DNS records
67
+
68
+
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.
69
+
70
+
## Verifying the installation
71
+
72
+
See the [verification steps](/reference/tls-openfaas.md#verifying-the-installation) in the main TLS guide.
0 commit comments