digitalocean/digitalocean-cloud-controller-manager

I can't do this http2 + with cert + redirect http to https !

phamquyhai opened this issue ยท 2 comments

Hi everyone !
Current i using https with cert + redirect. It's OK.

....
    service.beta.kubernetes.io/do-loadbalancer-protocol: "http"
    service.beta.kubernetes.io/do-loadbalancer-tls-ports: "443"
    service.beta.kubernetes.io/do-loadbalancer-certificate-id: 67514dca-185a-4279-bd8c-b1eeca6f9633
    service.beta.kubernetes.io/do-loadbalancer-redirect-http-to-https: "true"
name: kong-proxy
  namespace: kong
spec:
  ports:
  - name: proxy
    port: 80
    protocol: TCP
    targetPort: 8000
  - name: proxy-ssl
    port: 443
    protocol: TCP
    targetPort: 8000
....

But i added support http2 not working:

....
    service.beta.kubernetes.io/do-loadbalancer-protocol: "http2"
    service.beta.kubernetes.io/do-loadbalancer-tls-ports: "443"
    service.beta.kubernetes.io/do-loadbalancer-certificate-id: 67514dca-185a-4279-bd8c-b1eeca6f9633
    service.beta.kubernetes.io/do-loadbalancer-redirect-http-to-https: "true"
name: kong-proxy
  namespace: kong
spec:
  ports:
  - name: proxy
    port: 80
    protocol: TCP
    targetPort: 8000
  - name: proxy-ssl
    port: 443
    protocol: TCP
    targetPort: 8000
....

Please help me ๐Ÿ˜Š๐Ÿ˜Š๐Ÿ˜Š๐Ÿ˜Š๐Ÿ˜Š๐Ÿ˜Š๐Ÿ˜Š

You need to use the service.beta.kubernetes.io/do-loadbalancer-http2-ports annotation instead of service.beta.kubernetes.io/do-loadbalancer-tls-ports for HTTP2. Try swapping out the annotation names and it should work. ๐Ÿคž

thanks @timoreimann it's working :D