🏷️ Use the Gateway API to manage Ingress traffic

🏷️ Use the Gateway API to manage Ingress traffic#

Install Gateway API resources#

 k kustomize "https://github.com/nginx/nginx-gateway-fabric/config/crd/gateway-api/standard?ref=v2.3.0" | k apply -f -
 k api-resources --api-group='gateway.networking.k8s.io'
NAME              SHORTNAMES   APIVERSION                          NAMESPACED   KIND
gatewayclasses    gc           gateway.networking.k8s.io/v1        false        GatewayClass
gateways          gtw          gateway.networking.k8s.io/v1        true         Gateway
grpcroutes                     gateway.networking.k8s.io/v1        true         GRPCRoute
httproutes                     gateway.networking.k8s.io/v1        true         HTTPRoute
referencegrants   refgrant     gateway.networking.k8s.io/v1beta1   true         ReferenceGrant

Install Nginx Gateway Fabric#

 helm install ngf oci://ghcr.io/nginx/charts/nginx-gateway-fabric --create-namespace -n nginx-gateway --set nginx.service.type=NodePort
Pulled: ghcr.io/nginx/charts/nginx-gateway-fabric:2.3.0
[...]

Warning

The CRD version must match the image tag version: in this example 2.3.0.

TLS#

openssl req -x509 -new -nodes -newkey rsa:2048 -keyout notes.key -out notes.crt -subj '/CN=82.64.232.18/O=guisam/C=FR'
k -n notes create secret tls notes-tls --cert notes.crt --key notes.key