Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions content/includes/ngf/installation/expose-nginx-gateway-fabric.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,34 @@ weight: 300
nd-docs: "DOCS-1427"
---

There are two options for accessing NGINX Gateway Fabric depending on the type of LoadBalancer service you chose during installation:
When a Gateway resource is created, the NGINX Gateway Fabric control plane will provision an NGINX service in the same namespace as the Gateway. By default, this is a LoadBalancer service. This is not the same service that is deployed when NGINX Gateway Fabric is first installed. The NGINX Gateway Fabric control plane has its own ClusterIP service for internal communication with the NGINX data planes.

- If the LoadBalancer type is `NodePort`, Kubernetes will randomly allocate two ports on every node of the cluster.
To access the NGINX Gateway Fabric, use an IP address of any node of the cluster along with the two allocated ports.
There are two options for accessing the NGINX service depending on the type of LoadBalancer service you chose during installation:

- If the Service type is `NodePort`, Kubernetes will randomly allocate two ports on every node of the cluster.
To access NGINX, use an IP address of any node of the cluster along with the two allocated ports.

{{< call-out "tip" >}} Read more about the type NodePort in the [Kubernetes documentation](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport). {{< /call-out >}}

- If the LoadBalancer type is `LoadBalancer`:
- If the Service type is `LoadBalancer`:

- For GCP or Azure, Kubernetes will allocate a cloud load balancer for load balancing the NGINX Gateway Fabric pods.
Use the public IP of the load balancer to access NGINX Gateway Fabric.
- For GCP or Azure, Kubernetes will allocate a cloud load balancer for load balancing the NGINX pods.
Use the public IP of the load balancer to access NGINX.
- For AWS, Kubernetes will allocate a Network Load Balancer (NLB) in TCP mode with the PROXY protocol enabled to pass
the client's information (the IP address and the port).

Use the public IP of the load balancer to access NGINX Gateway Fabric. To get the public IP which is reported in the `EXTERNAL-IP` column:
Use the public IP of the load balancer to access NGINX. The NGINX Service exists in the same namespace that you deployed your Gateway in, and its name is `<gatewayName-gatewayClassName>`. To get the public IP which is reported in the `EXTERNAL-IP` column:

- For GCP or Azure, run:

```shell
kubectl get svc nginx-gateway -n nginx-gateway
kubectl get svc <gatewayName-gatewayClassName> -n <gateway-namespace>
```

- In AWS, the NLB (Network Load Balancer) DNS (directory name system) name will be reported by Kubernetes instead of a public IP. To get the DNS name, run:
- In AWS, the NLB (Network Load Balancer) DNS name will be reported by Kubernetes instead of a public IP. To get the DNS name, run:

```shell
kubectl get svc nginx-gateway -n nginx-gateway
kubectl get svc <gatewayName-gatewayClassName> -n <gateway-namespace>
```

{{< call-out "note" >}} We recommend using the NLB DNS whenever possible, but for testing purposes, you can resolve the DNS name to get the IP address of the load balancer:
Expand All @@ -46,8 +48,6 @@ There are two options for accessing NGINX Gateway Fabric depending on the type o
termination. Read the [Kubernetes documentation](https://kubernetes.io/docs/concepts/services-networking/service/#type-loadbalancer) to learn more.
{{< /call-out >}}

{{< call-out "important" >}}By default Helm and manifests configure NGINX Gateway Fabric on ports `80` and `443`, affecting any gateway [listeners](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1.Listener) on these ports. To use different ports, update the configuration. NGINX Gateway Fabric requires a configured [gateway](https://gateway-api.sigs.k8s.io/api-types/gateway/#gateway) resource with a valid listener to listen on any ports.{{< /call-out >}}

NGINX Gateway Fabric uses the created service to update the **Addresses** field in the **Gateway Status** resource. Using a **LoadBalancer** service sets this field to the IP address and/or hostname of that service. Without a service, the pod IP address is used.

This gateway is associated with the NGINX Gateway Fabric through the **gatewayClassName** field. The default installation of NGINX Gateway Fabric creates a **GatewayClass** with the name **nginx**. NGINX Gateway Fabric will only configure gateways with a **gatewayClassName** of **nginx** unless you change the name via the `--gatewayclass` [command-line flag]({{< ref "/ngf/reference/cli-help.md#controller">}}).
This gateway is associated with NGINX Gateway Fabric through the **gatewayClassName** field. The default installation of NGINX Gateway Fabric creates a **GatewayClass** with the name **nginx**. NGINX Gateway Fabric will only configure gateways with a **gatewayClassName** of **nginx** unless you change the name via the `--gatewayclass` [command-line flag]({{< ref "/ngf/reference/cli-help.md#controller">}}).
2 changes: 1 addition & 1 deletion content/ngf/install/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ kubectl wait --timeout=5m -n nginx-gateway deployment/ngf-nginx-gateway-fabric -

#### Service type

By default, the NGINX Gateway Fabric helm chart deploys a LoadBalancer Service.
By default, the NGINX Gateway Fabric control plane deploys a LoadBalancer Service when a Gateway is created.

To use a NodePort Service instead:

Expand Down
6 changes: 6 additions & 0 deletions content/ngf/install/secure-certificates.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ To complete this guide, you will need the following prerequisites:
- Administrator access to a Kubernetes cluster.
- [Helm](https://helm.sh) and [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) must be installed locally.

## Install Gateway API CRDs

```shell
kubectl kustomize "https://github.com/nginx/nginx-gateway-fabric/config/crd/gateway-api/standard?ref=v{{< version-ngf >}}" | kubectl apply -f -
```

## Install cert-manager

Add the Helm repository:
Expand Down