Expose service on custom port via `https` on GKE

﹥>﹥吖頭↗ 提交于 2021-02-11 06:56:38

问题


I am new to Kubernetes (GKE to be specific), this is my third week, so bare with me.

I've been tasked to expose a statefulset via https like this:

- https://example.com/whateva -> service:8080 (+Google Cloud CDN)
- https://example.com:5001    -> service:9095

I have been trying for a week now. It was under the impression that this requirement was pretty straight forward? Can anyone point me in the right direction?

Questions:

  • I would like to use the managedcertificate from the google cloud but it seems that's not possible?
  • Which ingress implementation is capable of achieving this while providing understandable documentation?

回答1:


The ingress creates an L7/HTTP/HTTPS load balancer which can only forward HTTPS on tcp port 443. The only load balancer that will forward port 5001 is the Network TCP/UDP type. The network load balancers will not terminate ssl/tls so a managedcertificate can not be used. The tls connection is passed through to pods in your cluster where the certificate and key must be present to handle the tls connections.



来源:https://stackoverflow.com/questions/65809893/expose-service-on-custom-port-via-https-on-gke

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!