NGINX Documentation

Upgrading NGINX Version in NGINX Ingress Controller to 1.21.0.

NGINX Ingress Controller release 1.11.3 will include NGINX version 1.21.0. Until 1.11.3 is released, you can use the following instructions to upgrade NGINX version to 1.21.0. The instructions are provided for the Debian-based image.

Note: This document will be removed once NGINX Ingress Controller 1.11.3 is released.

Prerequisites

  • Docker v18.09+
  • GNU Make
  • git

Build NGINX 1.21.0 Image

  1. Clone the NGINX Docker builds repo:

    $ git clone https://github.com/nginxinc/docker-nginx 
    
  2. Change to the mainline Debian folder:

    $ cd docker-nginx/mainline/debian
    
  3. Replace 1.19.10 with 1.21.0 in the line ENV NGINX_VERSION in Dockerfile. If the version is already updated in Dockerfile, skip this step.

  4. Build an image with NGINX 1.21 with the name nginx-mainline:1.21.0:

    $ docker build -t nginx-mainline:1.21.0 .
    

Build NGINX Ingress Controller image with NGINX 1.21.0

  1. Check out release 1.11.2 of the NGINX Ingress Controller:

    $ git clone https://github.com/nginxinc/kubernetes-ingress/
    $ cd kubernetes-ingress
    $ git checkout v1.11.2
    
  2. Replace FROM nginx:$NGINX_VERSION AS debian with FROM nginx-mainline:1.21.0 AS debian in build/Dockerfile

  3. Build and push the Debian-based image to your private registry – see Step 3 and Step 4 of the Building the Ingress Controller Image doc.

Once the image is built, upgrade your Ingress Controller to use the new image.