kong:gke入口:从上游服务器收到无效响应
我在 GKE 上有 kong 入口,如下所示,它有一个默认路径“/”转发到用 nextjs 编写的具有 keycloak 集成的 Web 应用程序。
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: myprojqlfingress
namespace: qlf
annotations:
kubernetes.io/tls-acme: "true"
cert-manager.io/cluster-issuer: letsencrypt-qlf
kubernetes.io/ingress.class: kong
konghq.com/request-buffering: "true"
konghq.com/response-buffering: "true"
spec:
tls:
- secretName: myproject-qlf
hosts:
- myproject-qlf.mydomain.net
rules:
- host: myproject-qlf.mydomain.net
http:
paths:
- path: /rfm
pathType: ImplementationSpecific
backend:
service:
name: rfmapi
port:
number: 8091
- path: /mb
pathType: ImplementationSpecific
backend:
service:
name: mbapi
port:
number: 8094
- path: /custseg
pathType: ImplementationSpecific
backend:
service:
name: custapi
port:
number: 8093
- path: /energy
pathType: ImplementationSpecific
backend:
service:
name: energyapi
port:
number: 8097
- path: /airline
pathType: ImplementationSpecific
backend:
service:
name: airlineapi
port:
number: 8096
- path: /hotel
pathType: ImplementationSpecific
backend:
service:
name: hotelapi
port:
number: 8095
- path: /
pathType: ImplementationSpecific
backend:
service:
name: datainsightfrontwebapp
port:
number: 3000
出于保密原因,我在这里更改了域名。
因此,在身份验证后,它会抛出错误:
从上游服务器收到无效响应
在开发环境中也存在同样的问题,我也使用注释修复了它: konghq.com/request-buffering:“true”,但在这种情况下它不起作用。
证书和所有配置都工作正常。
有什么想法吗?
I have kong ingress on GKE as follows, which has a default path "/" forwards to a web application written in nextjs that has keycloak integration.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: myprojqlfingress
namespace: qlf
annotations:
kubernetes.io/tls-acme: "true"
cert-manager.io/cluster-issuer: letsencrypt-qlf
kubernetes.io/ingress.class: kong
konghq.com/request-buffering: "true"
konghq.com/response-buffering: "true"
spec:
tls:
- secretName: myproject-qlf
hosts:
- myproject-qlf.mydomain.net
rules:
- host: myproject-qlf.mydomain.net
http:
paths:
- path: /rfm
pathType: ImplementationSpecific
backend:
service:
name: rfmapi
port:
number: 8091
- path: /mb
pathType: ImplementationSpecific
backend:
service:
name: mbapi
port:
number: 8094
- path: /custseg
pathType: ImplementationSpecific
backend:
service:
name: custapi
port:
number: 8093
- path: /energy
pathType: ImplementationSpecific
backend:
service:
name: energyapi
port:
number: 8097
- path: /airline
pathType: ImplementationSpecific
backend:
service:
name: airlineapi
port:
number: 8096
- path: /hotel
pathType: ImplementationSpecific
backend:
service:
name: hotelapi
port:
number: 8095
- path: /
pathType: ImplementationSpecific
backend:
service:
name: datainsightfrontwebapp
port:
number: 3000
Here I have changed domain name for confidentiality reason.
So after authentication it is throwing error:
An invalid response was received from the upstream server
The same problem was there in dev environment also which I fixed it using the annotation:
konghq.com/request-buffering: "true" but in this case it is not working.
certificate and all configurations are working fine.
Any idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用以下清单文件修复了该问题:
这意味着以下参数是必需的:
I fixed the issue using following manifest file:
Which means below parameters were essentials: