Kubernetes HTTPS Ingress in Google Container Engine

前端 未结 1 616
孤独总比滥情好
孤独总比滥情好 2021-01-12 17:49

I want to expose a HTTP service running in Google Container Engine over HTTPS only load balancer.

How to define in ingress object that I want

相关标签:
1条回答
  • 2021-01-12 18:13

    In order to have HTTPs service exposed only, you can block traffic on port 80 as mentioned on this link:

    You can block traffic on :80 through an annotation. You might want to do this if all your clients are only going to hit the loadbalancer through https and you don't want to waste the extra GCE forwarding rule, eg:

    apiVersion: extensions/v1beta1
    kind: Ingress
    metadata:
      name: test
      annotations:
        kubernetes.io/ingress.allow-http: "false"
    spec:
      tls:
      # This assumes tls-secret exists.
      # To generate it run the make in this directory.
      - secretName: tls-secret
      backend:
        serviceName: echoheaders-https
        servicePort: 80
    
    0 讨论(0)
提交回复
热议问题