I have config my ingress support SSL:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: "service"
annotations:
nginx.ingress.kubernetes.io/whitelist-source-range: "x.x.x.x/xx"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
spec:
tls:
- hosts:
- "example.com"
secretName: example.name
rules:
- host: "example.com"
http:
paths:
- path: /
backend:
serviceName: service
servicePort: 80
In my config above, only IP in whitelist can access the domain for both HTTP & HTTPS. But I would like to config all IP addresses can access https://example.com
(HTTPS) and some IP addresses in whitelist can access without SSL - http://example.com
.