hello I have a service written by java and I use 2 way SSL auth inside the service and I put SSL cert in the container the service it works normally when using port forward to localhost and making a request to https://localhost:8080
but when making a request to Ingress(https://foo.domain.com), the request goes to http://servicename:8080 but I need a request goes to https://servicename:8080
and when use Nginx-ingress annotations (nginx.ingress.kubernetes.io/backend-protocol: “HTTPS”) the response give “502 Bad Gateway”
my Ingress file is
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
nginx.ingress.kubernetes.io/auth-tls-secret: "default/foo-server-tls-secret"
name: foo-ingress
spec:
rules:
- host: foo.domain.com
http:
paths:
- path: /
backend:
serviceName: foo
servicePort: 8080
tls:
- hosts:
- foo.domain.com
secretName: foo-server-tls-secret