如何在Istio中公开gRPC

时间:2018-05-04 09:41:41

标签: grpc istio

任何人都知道是否可以将gRPC与Istio-ingress或其他方式一起使用?

是/否,欢迎任何事情 - 提前感谢。

apiVersion: v1
kind: Service
metadata:
  name: grpc-service
spec:
  # type: LoadBalancer
  selector:
    app: grpc
  ports:
  - port: 3000
    name: grpc
    # protocol: HTTP2
    targetPort: 3000

---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: grpc-ingress
  annotations:
    kubernetes.io/ingress.class: "istio"
    # ingress.kubernetes.io/ssl-passthrough: "true"
spec:
  rules:
  - http:
      paths:
      - path: /ghw/.*
        backend:
          serviceName: grpc-service
          servicePort: 3000

转到代码:

const (
    address     = "localhost/ghw/:3000"
)

0 个答案:

没有答案