diff --git a/content/ngf/install/manifests.md b/content/ngf/install/manifests.md index 59ca928b5..af8324f4b 100644 --- a/content/ngf/install/manifests.md +++ b/content/ngf/install/manifests.md @@ -54,13 +54,13 @@ Deploying NGINX Gateway Fabric with Kubernetes manifests takes only a few steps. #### Stable release ```shell -kubectl apply -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/crds.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/crds.yaml ``` #### Edge version ```shell -kubectl apply -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/main/deploy/crds.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/main/deploy/crds.yaml ``` ### Deploy NGINX Gateway Fabric diff --git a/content/ngf/install/upgrade-version.md b/content/ngf/install/upgrade-version.md index fedadffe0..45b4fa3fd 100644 --- a/content/ngf/install/upgrade-version.md +++ b/content/ngf/install/upgrade-version.md @@ -53,7 +53,7 @@ kubectl kustomize "https://github.com/nginx/nginx-gateway-fabric/config/crd/gate Run the following command to upgrade the CRDs: ```shell -kubectl apply -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/crds.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/crds.yaml ``` {{< note >}} @@ -157,7 +157,7 @@ For customization options during the Helm installation process, view the [Instal Apply the new CRDs with the following command: ```shell -kubectl apply -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/crds.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/crds.yaml ``` Next, install the latest stable release of NGINX Gateway Fabric in the `nginx-gateway` namespace with the following command: diff --git a/content/ngf/troubleshooting.md b/content/ngf/troubleshooting.md index 86705512c..90387ec6b 100644 --- a/content/ngf/troubleshooting.md +++ b/content/ngf/troubleshooting.md @@ -512,6 +512,21 @@ It indicates that `proxy_protocol` is enabled for the gateway listeners, but the - Send valid proxy information with requests being handled by your application. +#### Custom Resource Definition is invalid due to being too large + +If you apply the NGINX Gateway Fabric CRDs and see the following error: + +```text +The CustomResourceDefinition "nginxproxies.gateway.nginx.org" is invalid: metadata.annotations: Too long: may not be more than 262144 bytes +``` + +This is a known issue with Kubernetes, more specifically the client-side-apply annotation limit with kubectl, and our recommended workaround +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: + +```shell +kubectl apply --server-side -f https://raw.githubusercontent.com/nginx/nginx-gateway-fabric/v{{< version-ngf >}}/deploy/crds.yaml +``` + ### See also You can view the [Kubernetes Troubleshooting Guide](https://kubernetes.io/docs/tasks/debug/debug-application/) for more debugging guidance.