From 197f304dbfa1098d6adb2e7c95b67ec27663459d Mon Sep 17 00:00:00 2001 From: Venktesh Shivam Patel Date: Fri, 20 Dec 2024 11:49:46 +0000 Subject: [PATCH] update upgrade docs (#7036) --- .../includes/installation/create-custom-resources.md | 4 ++++ .../installing-nic/installation-with-helm.md | 3 +++ .../installation/installing-nic/upgrade-to-v4.md | 12 +++++++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/site/content/includes/installation/create-custom-resources.md b/site/content/includes/installation/create-custom-resources.md index b75d61faf9..fcd2d34078 100644 --- a/site/content/includes/installation/create-custom-resources.md +++ b/site/content/includes/installation/create-custom-resources.md @@ -32,6 +32,10 @@ kubectl apply -f https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v {{< note >}} If you are installing the CRDs this way, ensure you have first cloned the repository. {{< /note >}} +{{< note >}} Please make sure to read the steps outlined in [Upgrade to V4](https://docs.nginx.com/nginx-ingress-controller/installation/installing-nic/upgrade-to-v4/#update-custom-resource-apiversion) before running the CRD upgrade and perform the steps if applicable. +{{< /note >}} + + ```shell kubectl apply -f config/crd/bases/k8s.nginx.org_virtualservers.yaml kubectl apply -f config/crd/bases/k8s.nginx.org_virtualserverroutes.yaml diff --git a/site/content/installation/installing-nic/installation-with-helm.md b/site/content/installation/installing-nic/installation-with-helm.md index c0fe568b76..b464d3e716 100644 --- a/site/content/installation/installing-nic/installation-with-helm.md +++ b/site/content/installation/installing-nic/installation-with-helm.md @@ -34,6 +34,9 @@ If you do not use the custom resources that require those CRDs (which correspond ### Upgrade the CRDs +{{< note >}} Please make sure to read the steps outlined in [Upgrade to V4](https://docs.nginx.com/nginx-ingress-controller/installation/installing-nic/upgrade-to-v4/#update-custom-resource-apiversion) before running the CRD upgrade and perform the steps if applicable. +{{< /note >}} + To upgrade the CRDs, pull the chart sources as described in [Pull the Chart](#pull-the-chart) and then run: ```shell diff --git a/site/content/installation/installing-nic/upgrade-to-v4.md b/site/content/installation/installing-nic/upgrade-to-v4.md index 7880c17a94..d14c7bac19 100644 --- a/site/content/installation/installing-nic/upgrade-to-v4.md +++ b/site/content/installation/installing-nic/upgrade-to-v4.md @@ -19,7 +19,7 @@ For NGINX Plus users, there is a third step to create a Secret for your license. If the Helm chart you have been using is `v2.x`, before upgrading to NGINX Ingress Controller 4.0.0 you must update your GlobalConfiguration, Policy and TransportServer resources from `apiVersion: k8s.nginx.org/v1alpha1` to `apiVersion: k8s.nginx.org/v1`. -If the Helm chart you have been using is `v1.0.2` or earlier (NGINX Ingress Controller `v3.2.2`), upgrade to Helm chart `v1.4.2` (NGINX Ingress Controller `v3.7.2`) before updating your GlobalConfiguration, Policy and TransportServer resources. +If the Helm chart you have been using is `v1.0.2` or earlier (NGINX Ingress Controller `v3.3.2`), upgrade to Helm chart `v1.4.2` (NGINX Ingress Controller `v3.7.2`) before updating your GlobalConfiguration, Policy and TransportServer resources. The example below shows the change for a Policy resource: you must do the same for all GlobalConfiguration and TransportServer resources. @@ -61,6 +61,16 @@ spec: If a *GlobalConfiguration*, *Policy* or *TransportServer* resource is deployed with `apiVersion: k8s.nginx.org/v1alpha1`, it will be **deleted** during the upgrade process. {{}} +Once above specified custom resources are moved to `v1` ,please run below `kubectl` commands before upgrading to v4.0.0 Custom Resource Definitions (CRDs) to avoid [this issue](https://github.com/nginxinc/kubernetes-ingress/issues/7010). + +```shell +kubectl patch customresourcedefinitions transportservers.k8s.nginx.org --subresource='status' --type='merge' -p '{"status":{"storedVersions": ["v1"]}}' +``` + +```shell +kubectl patch customresourcedefinitions globalconfigurations.k8s.nginx.org --subresource='status' --type='merge' -p '{"status":{"storedVersions": ["v1"]}}' +``` + --- ## Configure structured logging