Unable to apply multiple certificates in istio-ingressgateway while hosting multiple site using same single gateway
I followed the same procedure as mentioned in the offical ISTIO documnetation (https://archive.istio.io/v1.1/docs/tasks/traffic-management/secure-ingress/sds/) to host multi-site using multiple SSL certificates but failed to apply both.
for ex:-
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: gateway
spec:
selector:
istio: ingressgateway # use Istio default gateway implementation
servers:
port:
number: 80
name: http-abc
protocol: HTTP
tls:
httpsRedirect: true # sends 301 redirect for http requests
hosts:
"abc.com"
port:
number: 443
name: https-abc
protocol: HTTPS
tls:
mode: SIMPLE
credentialName: "abc-credential"
hosts:
"abc.com"
port:
number: 80
name: http-xyz
protocol: HTTP
tls:
httpsRedirect: true # sends 301 redirect for http requests
hosts:
"xyz.com"
port:
number: 443
name: https-xyz
protocol: HTTPS
tls:
mode: SIMPLE
credentialName: "xyz-credential"
hosts:
"xyz.com"
both the certificates are uploaded in istio-system namespace as TLS/secret but it can only works for first one i.e abc-credential and unable to works for xyz-credential. Please let me know if anyone find solution for it.