<p>I have developed a spring boot app (User Registration app) that has one rest API. The rest API inserts the data in a MySQL.
The application and database have been deployed in GCP Kubernetes and everything was working fine as I was using network load balancer.
Now I am trying to use NGINX Ingress Controller and Path-based Ingress routing. A network load balancer is pointing to NGINX Ingress Controller and Load Balancer IP is tagged to a wild card host name in Cloud DNS. </p>

<p>From PostMan application whenever I am trying to hit the "User Registration App" using the DNS url it's throwing an error:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;405 Not Allowed&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;center&gt;
        &lt;h1&gt;405 Not Allowed&lt;/h1&gt;
    &lt;/center&gt;
    &lt;hr&gt;
    &lt;center&gt;openresty&lt;/center&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p><strong>I am trying to provide all the details I have right. Can provide more details if required. I am not able to understand why NGINX server is throwing "405 Not allowed error".</strong></p>

<h2>User Registration Spring Boot App</h2>

<p><a href="https://i.stack.imgur.com/Vf7MZ.png" rel="nofollow noreferrer">Spring Boot App Controller - POST method receive the input data</a></p>

<h2>NGINX Controller</h2>

<p>Followed the steps mentioned here: <a href="https://kubernetes.github.io/ingress-nginx/deploy/#detect-installed-version" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/deploy/#detect-installed-version</a></p>

<p>kubectl apply -f <a href="https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml" rel="nofollow noreferrer">https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml</a></p>

<p><a href="https://i.stack.imgur.com/ge6Dk.png" rel="nofollow noreferrer">Ingress Controller Service</a></p>

<h2>Kubernetes Services:</h2>

<p><a href="https://i.stack.imgur.com/67tJT.png" rel="nofollow noreferrer">Services Running in Kubernetes Cluster - Refer Yellow marked</a></p>

<h2>Kubernetes Pods:</h2>

<p><a href="https://i.stack.imgur.com/nfB6Z.png" rel="nofollow noreferrer">Pods running in Kubernetes Cluster - Refer Yellow marked</a></p>

<p><strong>Ingress YML:</strong></p>

<pre><code>`
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: fanout-ingress
  namespace: xyz-product
  labels:                     # Labels that will be applied to this resource
    app: prod-user-reg-app
  annotations:
    kubernetes.io/ingress.class: "nginx"
    ingress.kubernetes.io/ssl-redirect: "false"
    nginx.ingress.kubernetes.io/enable-cors: "true"
    nginx.ingress.kubernetes.io/cors-allow-methods: "PUT, GET, POST, OPTIONS"
spec:
  rules:
  - host: test.apps.myproduct.com
    http:
      paths:
      - path: /user-reg/create/*
        backend:
          serviceName: prod-user-reg-create-app
          servicePort: 8081`
</code></pre>

<p><a href="https://i.stack.imgur.com/pkFVH.png" rel="nofollow noreferrer">Kubctl Describe Ingress</a></p>

<p><a href="https://i.stack.imgur.com/EVzhF.png" rel="nofollow noreferrer">GCP Cloud DNS</a></p>

<p><strong>How do solve the issue? And where is the problem? In NGINX Controller service?</strong></p>

<p>Please help.</p>

Suvendu Mandal
<p>The resolution is here. Changed the URL path and used a registered domain to access via the internet.</p>

<p><a href="https://github.com/kubernetes/ingress-nginx/issues/4772" rel="nofollow noreferrer">https://github.com/kubernetes/ingress-nginx/issues/4772</a> and 
<a href="https://github.com/kubernetes/ingress-nginx/issues/4776" rel="nofollow noreferrer">https://github.com/kubernetes/ingress-nginx/issues/4776</a></p>
