nginx-ingress converts POST requests to GET

【Fault conditions】

          The ingress-controller was replaced in the online k8s cluster, and after TLS was added, the original POST request interface was converted into a GET request. As a result, the business service prompted "GET request is not supported".

【Solution】

         Add in the ingress configuration file:

ingress.kubernetes.io/ssl-redirect: 'false'

 or

nginx.ingress.kubernetes.io/ssl-redirect: 'false'

The setting methods of different versions are different, mine is the first one that takes effect.

In addition, there are other configurations, such as: 413 Request Entity  Too  Large  nginx/1.19

This is also different in different versions, set to:

nginx.org/client-max-body-size: 100m
或者
nginx.ingress.kubernetes.io/proxy-body-size: "100m"

 

Guess you like

Origin blog.csdn.net/qq_35008624/article/details/122156872