apisix-ingress-controller icon indicating copy to clipboard operation
apisix-ingress-controller copied to clipboard

配置k8s apisix ingress grpc的协议不生效,请帮助我

Open olddriver4 opened this issue 1 year ago • 11 comments

Description

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: base-grpc
  namespace: app
  annotations:
    kubernetes.io/ingress.class: apisix
    k8s.apisix.apache.org/upstream-scheme: grpc
spec:
  rules:
    - host: "base-grpc.app.ntrnl"
      http:
        paths:
          - path: /*
            pathType: Prefix
            backend:
              service:
                name: base
                port:
                  name: grpc
image

grpcurl -plaintext base-grpc.app.ntrnl:80 list social.base.PortalService
我确认是生效的,报错如下:
Failed to list methods for service "social.base.PortalService": rpc error: code = Unavailable desc = upstream connect error or disconnect/reset before headers. reset reason: protocol error

我的域名做了host解析,LB使用的是4层TCP协议,想问问这个问题出在哪里,我找了网上的配置都不能解决!
服务绝对没有问题,因为我使用svc host访问是正确的!

Environment

  • APISIX version (run apisix version): 3.7

olddriver4 avatar Apr 11 '24 04:04 olddriver4

请帮我解决如上问题,万分感激🥹

olddriver4 avatar Apr 11 '24 04:04 olddriver4

you would be more like to get help if you translate the issue content to english, thanks

shreemaan-abhishek avatar Apr 11 '24 05:04 shreemaan-abhishek

you would be more like to get help if you translate the issue content to english, thanks
@shreemaan-abhishek

grpcurl -plaintext base-grpc.app.ntrnl:80 list social.base.PortalService
The protocol configured for k8s apisix ingress grpc does not take effect, please help me. The error is reported as follows:
Failed to list methods for service "social.base.PortalService": rpc error: code = Unavailable desc = upstream connect error or disconnect/reset before headers. reset reason: protocol error

My domain name has been host-resolved, and LB uses Layer 4 TCP protocol. I would like to know where this problem lies. I have searched for online configurations but can't solve it!
There is absolutely no problem with the service, because I use svc host to access it correctly!

olddriver4 avatar Apr 11 '24 06:04 olddriver4

hello ?

olddriver4 avatar Apr 12 '24 03:04 olddriver4

Can i help me ?

olddriver4 avatar Apr 12 '24 04:04 olddriver4

帮忙啊 啊啊啊啊啊啊啊

olddriver4 avatar Apr 16 '24 04:04 olddriver4

@shreemaan-abhishek

olddriver4 avatar Apr 17 '24 01:04 olddriver4

@olddriver4 can you provide self-contained, detailed steps to reproduce this issue?

shreemaan-abhishek avatar Apr 18 '24 13:04 shreemaan-abhishek

Description

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: base-grpc
  namespace: app
  annotations:
    kubernetes.io/ingress.class: apisix
    k8s.apisix.apache.org/upstream-scheme: grpc
spec:
  rules:
    - host: "base-grpc.app.ntrnl"
      http:
        paths:
          - path: /*
            pathType: Prefix
            backend:
              service:
                name: base
                port:
                  name: grpc
image `grpcurl -plaintext base-grpc.app.ntrnl:80 list social.base.PortalService` 我确认是生效的,报错如下: `Failed to list methods for service "social.base.PortalService": rpc error: code = Unavailable desc = upstream connect error or disconnect/reset before headers. reset reason: protocol error`

我的域名做了host解析,LB使用的是4层TCP协议,想问问这个问题出在哪里,我找了网上的配置都不能解决! 服务绝对没有问题,因为我使用svc host访问是正确的!

Environment

  • APISIX version (run apisix version): 3.7

you would be more like to get help if you translate the issue content to english, thanks @shreemaan-abhishek

grpcurl -plaintext base-grpc.app.ntrnl:80 list social.base.PortalService The protocol configured for k8s apisix ingress grpc does not take effect, please help me. The error is reported as follows: Failed to list methods for service "social.base.PortalService": rpc error: code = Unavailable desc = upstream connect error or disconnect/reset before headers. reset reason: protocol error

My domain name has been host-resolved, and LB uses Layer 4 TCP protocol. I would like to know where this problem lies. I have searched for online configurations but can't solve it! There is absolutely no problem with the service, because I use svc host to access it correctly!

This is the configuration of the apisix service:

apiVersion: v1
kind: Service
metadata:
  name: apisix-gateway
  namespace: apisix
  labels:
    app: apisix
    version: "3.7.0"
spec:
  type: LoadBalancer
  ports:
  - name: apisix-gateway-http
    port: 80
    targetPort: 9080
    protocol: TCP
  - name: apisix-gateway-https
    port: 443
    targetPort: 9080
    protocol: TCP
  selector:
    app: apisix
    version: "3.7.0"

The above are all the steps of my configuration. I really don’t have more detailed configuration problems. Could you please help me detect whether it is a configuration problem there or a LB problem? @shreemaan-abhishek

olddriver4 avatar Apr 19 '24 01:04 olddriver4

@spacewander help me, thanks!

olddriver4 avatar Apr 26 '24 03:04 olddriver4

to: https://github.com/apache/apisix/issues/11206

olddriver4 avatar Apr 26 '24 04:04 olddriver4

This issue has been marked as stale due to 90 days of inactivity. It will be closed in 30 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Jul 26 '24 01:07 github-actions[bot]

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.

github-actions[bot] avatar Aug 25 '24 01:08 github-actions[bot]