Skip to content

Commit 8abf3a5

Browse files
committed
Add review feedback
1 parent fa0da61 commit 8abf3a5

File tree

1 file changed

+66
-67
lines changed

1 file changed

+66
-67
lines changed

content/ngf/installation/installing-ngf/deploy-data-plane.md

Lines changed: 66 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Deploy the Data Plane
2+
title: Deploy a Gateway for data plane instances
33
weight: 500
44
toc: true
55
type: how-to
@@ -9,30 +9,17 @@ docs: DOCS-000
99

1010
## Overview
1111

12-
Learn how NGINX Gateway Fabric provisions NGINX Data Plane instances and how to modify them.
12+
This document describes how to use a Gateway to deploy the NGINX data plane, and how to modify it using an NGINX custom resource.
1313

14-
---
15-
16-
## Before you begin
17-
18-
- [Install]({{< ref "/ngf/installation/" >}}) NGINX Gateway Fabric.
14+
[A Gateway](https://gateway-api.sigs.k8s.io/concepts/api-overview/#gateway) is used to manage all inbound requests, and is a key Gateway API resource.
1915

20-
---
21-
22-
## What is a Gateway
23-
24-
As the official [Gateway API Docs](https://gateway-api.sigs.k8s.io/concepts/api-overview/#gateway) put it,
25-
"A Gateway describes how traffic can be translated to Services within the cluster.
26-
That is, it defines a request for a way to translate traffic from somewhere that does not know about Kubernetes to somewhere that does.".
16+
When a Gateway is attached to a GatewayClass associated with NGINX Gateway Fabric, it creates a Service and an NGINX deployment. This forms the NGINX data plane, handling requests.
2717

28-
As the name suggests, a Gateway is at the heart for all inbound request trafficking and is a key Gateway API resource.
29-
When a Gateway is attached to a GatewayClass associated with NGINX Gateway Fabric, a Service and NGINX Deployment are created
30-
and form the NGINX Data Plane to handle requests.
18+
A single GatewayClass can have multiple Gateways: each Gateway will create a separate Service and NGINX deployment.
3119

32-
Multiple Gateways can be attached to the single GatewayClass associated with NGINX Gateway Fabric.
33-
Separate Services and NGINX Deployments are then created for each Gateway.
20+
## Before you begin
3421

35-
---
22+
- [Install]({{< ref "/ngf/installation/" >}}) NGINX Gateway Fabric.
3623

3724
## Create a Gateway
3825

@@ -89,52 +76,59 @@ Conditions:
8976
Type: Conflicted
9077
```
9178

92-
Using `kubectl get` we can see the NGINX Deployment:
79+
Using `kubectl get` you can see the NGINX Deployment:
9380

94-
```text
95-
~ ❯ kubectl get deployments ⎈ kind-kind
81+
```shell
82+
kubectl get deployments
83+
```
84+
```text ⎈ kind-kind
9685
NAME READY UP-TO-DATE AVAILABLE AGE
9786
cafe-nginx 1/1 1 1 3m18s
9887
```
9988

100-
We can also see the Service fronting it:
89+
You can also see the Service fronting it:
10190

102-
```text
103-
~ ❯ kubectl get services ⎈ kind-kind
91+
```shell
92+
kubectl get services
93+
```
94+
```text ⎈ kind-kind
10495
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
10596
cafe-nginx NodePort 10.96.125.117 <none> 80:30180/TCP 5m2s
10697
```
10798

108-
The type of Service can be modified, which will be explained below.
109-
110-
---
99+
The Service type can be changed, explained in the next section.
111100

112101
## How to modify provisioned NGINX instances
113102

114-
Both the NGINX Deployment and Service Kubernetes objects provisioned by NGINX Gateway Fabric upon creation of a Gateway
115-
can be modified through the NginxProxy custom resource.
103+
The NginxProxy custom resource can modify the provisioning of the Service object and NGINX deployment when a Gateway is created.
116104

117-
{{< note >}} Updating most Kubernetes related fields in NginxProxy will trigger a restart of the related resource to update. {{< /note >}}
105+
{{< note >}} Updating most Kubernetes related fields in NginxProxy will trigger a restart of the related resources. {{< /note >}}
118106

119-
An NginxProxy resource is created by default after deploying NGINX Gateway Fabric. Use `kubectl get` and `kubectl describe` to
120-
get some more information on the resource:
107+
An NginxProxy resource is created by default after deploying NGINX Gateway Fabric. This NginxProxy resource is attached to the GatewayClass (created on NGINX Gateway Fabric deployment), and
108+
its settings are applied globally to all Gateways.
121109

122-
```text
123-
~ ❯ kubectl get nginxproxies -A ⎈ kind-kind
110+
Use `kubectl get` and `kubectl describe` to get some more information on the resource:
111+
112+
```shell
113+
kubectl get nginxproxies -A
114+
```
115+
```text ⎈ kind-kind
124116
NAMESPACE NAME AGE
125-
nginx-gateway my-release-proxy-config 19h
117+
nginx-gateway ngf-proxy-config 19h
126118
```
127119

128-
```text
129-
~ ❯ kubectl describe nginxproxy -n nginx-gateway my-release-proxy-config ⎈ kind-kind
130-
Name: my-release-proxy-config
120+
```shell
121+
kubectl describe nginxproxy -n nginx-gateway ngf-proxy-config
122+
```
123+
```text ⎈ kind-kind
124+
Name: ngf-proxy-config
131125
Namespace: nginx-gateway
132-
Labels: app.kubernetes.io/instance=my-release
126+
Labels: app.kubernetes.io/instance=mngf
133127
app.kubernetes.io/managed-by=Helm
134128
app.kubernetes.io/name=nginx-gateway-fabric
135129
app.kubernetes.io/version=edge
136130
helm.sh/chart=nginx-gateway-fabric-1.6.2
137-
Annotations: meta.helm.sh/release-name: my-release
131+
Annotations: meta.helm.sh/release-name: ngf
138132
meta.helm.sh/release-namespace: nginx-gateway
139133
API Version: gateway.nginx.org/v1alpha2
140134
Kind: NginxProxy
@@ -149,7 +143,7 @@ Spec:
149143
Deployment:
150144
Container:
151145
Image:
152-
Pull Policy: Never
146+
Pull Policy: IfNotPresent
153147
Repository: nginx-gateway-fabric/nginx
154148
Tag: edge
155149
Replicas: 1
@@ -159,25 +153,28 @@ Spec:
159153
Events: <none>
160154
```
161155

162-
From the information we got through `kubectl describe` we can see the default settings for the provisioned NGINX Deployment and Service.
163-
Under `Spec.Kubernetes` we can see a couple of things:
156+
From the information obtained with `kubectl describe` you can see the default settings for the provisioned NGINX Deployment and Service.
157+
Under `Spec.Kubernetes` you can see a few things:
164158
- The NGINX container image settings
165159
- How many NGINX Deployment replicas are specified
166160
- The type of Service and external traffic policy
167161

168-
{{< note >}} These default NginxProxy settings may change over time, and may not match what is shown. {{< /note >}}
162+
{{< note >}} Depending on installation configuration, the default NginxProxy settings may be slightly different from what is shown in the example. {{< /note >}}
163+
164+
Modify the NginxProxy resource to change the type of Service.
169165

170-
Let's modify the NginxProxy resource to change the type of Service. Use `kubectl edit` to modify the default
171-
NginxProxy and insert the following under `spec.kubernetes.service`
166+
Use `kubectl edit` to modify the default NginxProxy and insert the following under `spec.kubernetes.service`:
172167

173168
```yaml
174169
type: LoadBalancer
175170
```
176171
177172
After saving the changes, use `kubectl get` on the service, and you should see the service type has changed to LoadBalancer.
178173

179-
```text
180-
~ ❯ kubectl get service cafe-nginx ⎈ kind-kind
174+
```shell
175+
kubectl get service cafe-nginx
176+
```
177+
```text ⎈ kind-kind
181178
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
182179
cafe-nginx LoadBalancer 10.96.172.204 <pending> 80:32615/TCP 3h5m
183180
```
@@ -188,7 +185,7 @@ While the majority of configuration will happen on the NginxProxy resource, that
188185
you want to set any annotations or labels on the NGINX Deployment or Service, you need to set those annotations on the Gateway which
189186
provisioned them.
190187

191-
To do so, we can use `kubectl edit` on our gateway and add the following to the `spec`:
188+
You can use `kubectl edit` on the Gateway and add the following to the `spec`:
192189

193190
```yaml
194191
infrastructure:
@@ -198,17 +195,19 @@ infrastructure:
198195
labelKey: labelValue
199196
```
200197

201-
After saving the changes, we can check our NGINX Deployment and Service using `kubectl describe`.
198+
After saving the changes, check the Service and NGINX deployment with `kubectl describe`.
202199

203-
```text
204-
~ ❯ kubectl describe deployment cafe 1m 52s ⎈ kind-kind
200+
```shell
201+
kubectl describe deployment cafe
202+
```
203+
```text 1m 52s ⎈ kind-kind
205204
Name: cafe-nginx
206205
Namespace: default
207206
CreationTimestamp: Mon, 05 May 2025 16:49:33 -0700
208207
...
209208
Pod Template:
210-
Labels: app.kubernetes.io/instance=my-release
211-
app.kubernetes.io/managed-by=my-release-nginx
209+
Labels: app.kubernetes.io/instance=ngf
210+
app.kubernetes.io/managed-by=ngf-nginx
212211
app.kubernetes.io/name=cafe-nginx
213212
gateway.networking.k8s.io/gateway-name=cafe
214213
labelKey=labelValue
@@ -220,25 +219,25 @@ Pod Template:
220219

221220
{{< note >}} In order for the changes to propagate onto the Service, it needs to be manually restarted. {{< /note >}}
222221

223-
```text
224-
~ ❯ kubectl describe service cafe-nginx ⎈ kind-kind
222+
```shell
223+
kubectl describe service cafe-nginx
224+
```
225+
```text ⎈ kind-kind
225226
Name: cafe-nginx
226227
Namespace: default
227-
Labels: app.kubernetes.io/instance=my-release
228-
app.kubernetes.io/managed-by=my-release-nginx
228+
Labels: app.kubernetes.io/instance=ngf
229+
app.kubernetes.io/managed-by=ngf-nginx
229230
app.kubernetes.io/name=cafe-nginx
230231
gateway.networking.k8s.io/gateway-name=cafe
231232
labelKey=labelValue
232233
Annotations: annotationKey: annotationValue
233234
```
234235

235-
---
236-
237-
## See Also
236+
## See also
238237

239238
For more guides on routing traffic to applications and more information on Data Plane configuration, check out the following resources:
240239

241-
- [Routing Traffic to Your App]({{< ref "/ngf/how-to/traffic-management/routing-traffic-to-your-app.md" >}})
242-
- [Advanced Routing]({{< ref "/ngf/how-to/traffic-management/advanced-routing.md" >}})
243-
- [Data Plane Configuration]({{< ref "/ngf/how-to/data-plane-configuration.md" >}})
244-
- [NGINX Gateway Fabric API Reference]({{< ref "/ngf/reference/api.md" >}})
240+
- [Routing traffic to applications]({{< ref "/ngf/how-to/traffic-management/routing-traffic-to-your-app.md" >}})
241+
- [Application routes using HTTP matching conditions]({{< ref "/ngf/how-to/traffic-management/advanced-routing.md" >}})
242+
- [Data plane configuration]({{< ref "/ngf/how-to/data-plane-configuration.md" >}})
243+
- [API reference]({{< ref "/ngf/reference/api.md" >}})

0 commit comments

Comments
 (0)