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
[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.
19
15
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.
27
17
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.
31
19
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.
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.
111
100
112
101
## How to modify provisioned NGINX instances
113
102
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.
116
104
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 >}}
118
106
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.
121
109
122
-
```text
123
-
~ ❯ kubectl get nginxproxies -A ⎈ kind-kind
110
+
Use `kubectl get` and `kubectl describe` to get some more information on the resource:
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:
164
158
- The NGINX container image settings
165
159
- How many NGINX Deployment replicas are specified
166
160
- The type of Service and external traffic policy
167
161
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.
169
165
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`:
172
167
173
168
```yaml
174
169
type: LoadBalancer
175
170
```
176
171
177
172
After saving the changes, use `kubectl get` on the service, and you should see the service type has changed to LoadBalancer.
0 commit comments