Skip to content

Commit bc55551

Browse files
bjee19ADubhlaoich
andauthored
Update NGF docs to use kubectl server side apply (#787)
Switch to using kubectl server side apply for NGF CRDs and add a troubleshooting section addressing the problem and solution. Problem: We were running into issues using the standard kubectl client side apply on our growing CRDs Solution: Switched to using kubectl server side apply. Co-authored-by: Alan Dooley <a.dooley@f5.com>
1 parent f5dc72a commit bc55551

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

content/ngf/install/manifests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ Deploying NGINX Gateway Fabric with Kubernetes manifests takes only a few steps.
5454
#### Stable release
5555

5656
```shell
57-
kubectl apply -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/crds.yaml
57+
kubectl apply --server-side -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/crds.yaml
5858
```
5959

6060
#### Edge version
6161

6262
```shell
63-
kubectl apply -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/main/deploy/crds.yaml
63+
kubectl apply --server-side -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/main/deploy/crds.yaml
6464
```
6565

6666
### Deploy NGINX Gateway Fabric

content/ngf/install/upgrade-version.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ kubectl kustomize "https://github.com/nginx/nginx-gateway-fabric/config/crd/gate
5353
Run the following command to upgrade the CRDs:
5454

5555
```shell
56-
kubectl apply -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/crds.yaml
56+
kubectl apply --server-side -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/crds.yaml
5757
```
5858

5959
{{< note >}}
@@ -157,7 +157,7 @@ For customization options during the Helm installation process, view the [Instal
157157
Apply the new CRDs with the following command:
158158

159159
```shell
160-
kubectl apply -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/crds.yaml
160+
kubectl apply --server-side -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/crds.yaml
161161
```
162162

163163
Next, install the latest stable release of NGINX Gateway Fabric in the `nginx-gateway` namespace with the following command:

content/ngf/troubleshooting.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,21 @@ It indicates that `proxy_protocol` is enabled for the gateway listeners, but the
512512

513513
- Send valid proxy information with requests being handled by your application.
514514

515+
#### Custom Resource Definition is invalid due to being too large
516+
517+
If you apply the NGINX Gateway Fabric CRDs and see the following error:
518+
519+
```text
520+
The CustomResourceDefinition "nginxproxies.gateway.nginx.org" is invalid: metadata.annotations: Too long: may not be more than 262144 bytes
521+
```
522+
523+
This is a known issue with Kubernetes, more specifically the client-side-apply annotation limit with kubectl, and our recommended workaround
524+
is to use kubectl's server-side apply when installing the NGINX Gateway Fabric CRDs. To do this, you can use the `--server-side` flag when applying the CRDs:
525+
526+
```shell
527+
kubectl apply --server-side -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/crds.yaml
528+
```
529+
515530
### See also
516531

517532
You can view the [Kubernetes Troubleshooting Guide](https://kubernetes.io/docs/tasks/debug/debug-application/) for more debugging guidance.

0 commit comments

Comments
 (0)