ingress.yaml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. apiVersion: extensions/v1beta1
  2. kind: Ingress
  3. metadata:
  4. annotations:
  5. kubernetes.io/ingress.class: "nginx"
  6. nginx.ingress.kubernetes.io/proxy-connect-timeout: "600"
  7. nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
  8. nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
  9. nginx.ingress.kubernetes.io/proxy-body-size: "10m"
  10. nginx.ingress.kubernetes.io/ssl-redirect: "false"
  11. nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
  12. name: grpc-example
  13. namespace: prd
  14. spec:
  15. tls:
  16. - hosts:
  17. - example.wanpinghui.com
  18. secretName: ex-wph-secret
  19. rules:
  20. - host: example.wanpinghui.com
  21. http:
  22. paths:
  23. - path: /
  24. backend:
  25. serviceName: grpc-example
  26. servicePort: grpc
  27. # nginx ingress controller 1.8之前的版本使用
  28. # nginx.ingress.kubernetes.io/grpc-backend: "true"
  29. # qcloud类型ingress转发配置,不支持gRPC
  30. #apiVersion: extensions/v1beta1
  31. #kind: Ingress
  32. #metadata:
  33. # annotations:
  34. # kubernetes.io/ingress.class: qcloud
  35. # kubernetes.io/ingress.http-rules: '[{"path":"/","backend":{"serviceName":"grpc-example","servicePort":"50051"}}]'
  36. # kubernetes.io/ingress.https-rules: "null"
  37. # kubernetes.io/ingress.rule-mix: "false"
  38. # kubernetes.io/ingress.subnetId: subnet-bkmrev02
  39. # name: grpc-example
  40. # namespace: prd
  41. #spec:
  42. # rules:
  43. # - http:
  44. # paths:
  45. # - path: /
  46. # backend:
  47. # serviceName: grpc-example
  48. # servicePort: grpc
  49. #
  50. #status: {}