k8s ingress controller doesn't pass certificate to upstream https service.
with nginx i could achive with something like this
location /upstream {
proxy_pass https://backend.example.com;
proxy_ssl_certificate /etc/nginx/client.pem;
proxy_ssl_certificate_key /etc/nginx/client.key;
}
Am i missing something here! My current config look something like this. I don't want pass ssl comming from client will terminate here.
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: backend
namespace: default
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: "/$1"
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
nginx.ingress.kubernetes.io/secure-backends: "true"
nginx.ingress.kubernetes.io/proxy-ssl-secret: "proxy-ca-secret"
nginx.ingress.kubernetes.io/proxy-ssl-name: "backend.example.com"
spec:
rules:
- http:
paths:
- path: /(api/auth/.*)
backend:
serviceName: auth
servicePort: 8080
Log shows
SSL_do_handshake() failed (SSL: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate:SSL alert number 42) while SSL handshaking to upstream
I verfied base64 cert with openssl cert look fine. Thanks in advance!