'Anthos Service mesh (istio) and keycloak pod connection error to external postgres

I have installed Anthos service mesh in my GKE cluster and a keycloak statefulset that connect to an external database in GCP. When the istio sidecar are in the keycloak pod, I get this error in keycloak container:

keycloak 07:21:54.00 ERROR ==> Unable to connect to host XXX.XXX.XXX.XXX

In the istio_proxy container I get this error:

Error stsserver http: Server closed

Error: failed to start xds proxy: failed to build TLS dial option to talk to upstream: failed to find root CA cert for XDS: root CA file for XDS does not exist ./var/run/secrets/kubernetes.io/serviceaccount/ca.crt 2022-02-28T07:23:00.961316Z error failed to start xds proxy: failed to build TLS dial option to talk to upstream: failed to find root CA cert for XDS: root CA file for XDS does not exist ./var/run/secrets/kubernetes.io/serviceaccount/ca.crt

I have other two pods that connects to the database and thoose works fine, but keycloak doesn't

Can anyone helps me?

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source