Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot NGINX入口控制器-不允许使用405_Spring Boot_Nginx_Kubernetes_Google Cloud Platform - Fatal编程技术网

Spring boot NGINX入口控制器-不允许使用405

Spring boot NGINX入口控制器-不允许使用405,spring-boot,nginx,kubernetes,google-cloud-platform,Spring Boot,Nginx,Kubernetes,Google Cloud Platform,我开发了一个SpringBoot应用程序(用户注册应用程序),它有一个RESTAPI。RESTAPI将数据插入MySQL中。 应用程序和数据库已经部署在GCP Kubernetes中,当我使用网络负载平衡器时,一切都正常工作。 现在我尝试使用NGINX入口控制器和基于路径的入口路由。网络负载平衡器指向NGINX入口控制器,负载平衡器IP标记为云DNS中的通配符主机名 从PostMan应用程序每当我尝试使用DNS url点击“用户注册应用程序”时,它都会抛出一个错误: <html> &

我开发了一个SpringBoot应用程序(用户注册应用程序),它有一个RESTAPI。RESTAPI将数据插入MySQL中。 应用程序和数据库已经部署在GCP Kubernetes中,当我使用网络负载平衡器时,一切都正常工作。 现在我尝试使用NGINX入口控制器和基于路径的入口路由。网络负载平衡器指向NGINX入口控制器,负载平衡器IP标记为云DNS中的通配符主机名

从PostMan应用程序每当我尝试使用DNS url点击“用户注册应用程序”时,它都会抛出一个错误:

<html>
<head>
    <title>405 Not Allowed</title>
</head>
<body>
    <center>
        <h1>405 Not Allowed</h1>
    </center>
    <hr>
    <center>openresty</center>
</body>
</html>

如何解决这个问题?问题出在哪里?在NGINX控制器服务中?


请帮忙。

决议就在这里。更改了URL路径并使用注册域通过internet进行访问


我正在尝试使用url:from PostMan访问应用程序,并以JSON格式传递输入值
`
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`