apiVersion: networking.k8s.io/v1
#apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
    nginx.ingress.kubernetes.io/configuration-snippet: |
      if ($http_servicename) {
        grpc_pass grpc://$http_servicename.default.svc.cluster.local:8081;
        break;
      }
  name: efls-ingress
  namespace: default
spec:
  rules:
  - host: www.alibaba.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: go-grpc-greeter-server
            port:
              number: 80
  tls:
  - secretName: tls-secret
    hosts:
      - www.alibaba.com
