Need help to translate ingress-nginx annotations to NGINX-ingress

Please use this template for troubleshooting questions.

My issue: Need to translate annotation from ingress-nginx

How I encountered the problem: Trying to create an ingress template

Solutions I’ve tried: n/a

Version of NIC and/or NGINX: nginx-ingress 2.2.2

Deployment environment: AWS EKS cluster

Hi all,

I’m trying to translate those annotations from nginx-ingress controller to NGINX-ingress:

    nginx.ingress.kubernetes.io/rewrite-target: /$2
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
    nginx.ingress.kubernetes.io/proxy-body-size: 20M
    nginx.ingress.kubernetes.io/configuration-snippet: |
      rewrite ^/app-name(/|$)(.*) /$2 break;

I can not find any way to translate :frowning:

Need help from community.

Would be very appreciated

Regards

1 Like

Hi Alberto.

Thank you for your post!

Our supported annotations can be found here: NGINX Ingress Controller Advanced Configuration with Annotations. They are not identical to the ingress-nginx annotations, but the good news is that you can achieve the same functionality using nginx-ingress annotations.

  • nginx.ingress.kubernetes.io/rewrite-target will be available in our upcoming release in early December (less than 2 weeks away): PR #8508.

  • nginx.ingress.kubernetes.io/ssl-redirect is called ingress.kubernetes.io/ssl-redirect in nginx-ingress.

  • nginx.ingress.kubernetes.io/proxy-body-size is used to set the maximum size of a client request body. This corresponds to client_max_body_size, which can be achieved with nginx.org/client-max-body-size in our version.

  • nginx.ingress.kubernetes.io/configuration-snippet is separated into server and location snippets (nginx.org/location-snippets and nginx.org/server-snippets). Which one to use depends on where the snippet needs to be included in the NGINX configuration. From looking at yours, I think it’s a location snippet. :slight_smile:

Hope this helps!

Micheal

4 Likes

Hi Micheal,

Great!!! your information will be very useful for us!!!

Thanks.

3 Likes

hey @albertmoreno rewrite-target is now available in 5.3.0 release in NIC