http -> https redirect in Google Kubernetes Engine
问题 I'm looking to redirect all traffic from http://example.com -> https://example.com like how nearly all websites do. I've looked at this link with no success: Kubernetes HTTPS Ingress in Google Container Engine And have tried the following annotations in my ingress.yaml file. nginx.ingress.kubernetes.io/configuration-snippet: | if ($http_x_forwarded_proto != 'https') { return 301 https://$host$request_uri; } nginx.ingress.kubernetes.io/force-ssl-redirect: "true" nginx.ingress.kubernetes.io/ssl