Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add upgrading to 4.x docs #6930

Merged
merged 12 commits into from
Dec 13, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ The JWT is required for validating your subscription and reporting telemetry dat

{{< note >}} Read the [subscription licenses topic](https://docs.nginx.com/solutions/about-subscription-licenses/#for-internet-connected-environments) for a list of IPs associated with F5's licensing endpoint (`product.connect.nginx.com`). {{</ note >}}

## Set up the JWT
## Set up your NGINX Plus license

### Download the JWT
{{< include "installation/download-jwt.md" >}}

### Create the Secret

The JWT needs to be configured before deploying NGINX Ingress Controller. The JWT will be stored in a Kubernetes Secret of type `nginx.com/license`, and can be created with the following command.

```shell
Expand Down Expand Up @@ -63,9 +66,9 @@ For detailed guidance on creating the Management ConfigMap, refer to the [Manage

### Reports for NGINX Instance Manager {#nim}

If you are deploying NGINX Ingress Controller in an "air-gapped" environment you will need to report to NGINX Instance Manager (NIM) instead of the default licensing endpoint.
If you are deploying NGINX Ingress Controller in an "air-gapped" environment you will need to report to [NGINX Instance Manager](https://docs.nginx.com/nginx-instance-manager/) instead of the default licensing endpoint.

First, you must specify the endpoint of your NGINX Instance Manager:
First, you must specify the endpoint of your NGINX Instance Manager.

{{<tabs name="nim-endpoint">}}

Expand Down
92 changes: 92 additions & 0 deletions site/content/upgrading-to-v4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
description: Guide on upgrading to v4 and above
docs: DOCS-000
title: Guide on upgrading to NGINX Ingress Controller 4.0.0
toc: true
weight: 2100
headless: true
---

{{< note >}}
If you are using NGINX Ingress Controller version `v3.3.2` (Helm Chart `v1.0.2`) or earlier, please upgrade to `v3.7.2` (Helm Chart `v1.4.2`), and convert your TransportServer and GlobalConfiguration resources to `apiVersion` `k8s.nginx.org/v1`.
vepatel marked this conversation as resolved.
Show resolved Hide resolved
{{</ note >}}
1. If using NGINX Ingress Controller custom resources with an `apiVersion` of `k8s.nginx.org/v1alpha1`, prior to upgrading to `v4.x` (Helm Chart `v2.x`) , **please ensure** that they are updated to `apiVersion: k8s.nginx.org/v1`
{{< important >}}
If a resource of `kind: GlobalConfiguration`, `kind: Policy` or `kind: TransportServer` is deployed as `apiVersion: k8s.nginx.org/v1alpha1`, it will be **deleted** during the upgrade process
{{</ important >}}

Below is an example of how a Policy resource would change. Please ensure the same is done for GlobalConfiguration and TransportServer.

{{<tabs name="resource-version-update">}}

{{% comment %}} Keep this left aligned. {{% /comment %}}
{{%tab name="Before"%}}

```yaml
apiVersion: k8s.nginx.org/v1alpha1
kind: Policy
metadata:
name: rate-limit-policy
spec:
rateLimit:
rate: 1r/s
key: ${binary_remote_addr}
zoneSize: 10M
```


{{% /tab %}}

{{%tab name="After"%}}
```yaml
apiVersion: k8s.nginx.org/v1
kind: Policy
metadata:
name: rate-limit-policy
spec:
rateLimit:
rate: 1r/s
key: ${binary_remote_addr}
zoneSize: 10M
```
{{% /tab %}}

{{</tabs>}}

1. Read the [Create License Secret]({{< relref "installation/installing-nic/create-license-secret">}}) topic to set up your NGINX Plus license.
1. Usage reporting through the Cluster Connector is no longer required, and is now native to NGINX.
1. If your NGINX Ingress Controller installation is in an "air-gapped" environment, [usage reports can be sent to NGINX Instance Manager]({{< relref "installation/installing-nic/create-license-secret/#nim">}}).
1. Configure Structured Logging

{{<tabs name="structured logging">}}

{{%tab name="Helm"%}}

The previous Helm value `controller.logLevel` has been changed from an integer to a string. Options include: trace, debug, info, warning, error and fatal.

Logs can also be rendered in different formats using the `controller.logFormat` key. Options include: glog, json and text. This only applies to NGINX Ingress Controller logs, not NGINX logs.

```yaml
controller:
logLevel: info
logFormat: json
```
{{% /tab %}}

{{%tab name="Manifests"%}}

The command line argument `-v` has been replaced with `-log-level`. It has been changed from an integer to a string. Options include: trace, debug, info, warning, error and fatal.

Logs can also be rendered in different formats using the `-log-format` command line argument. Options include: glog, json and text. This only applies to NGINX Ingress Controller logs, not NGINX logs.

The command line argument `-logtostderr` has been deprecated.

```yaml
args:
- -log-level=info
- -log-format=json
```

{{% /tab %}}

{{</tabs>}}