kumahq / kuma

🐻 The multi-zone service mesh for containers, Kubernetes and VMs. Built with Envoy. CNCF Sandbox Project.
https://kuma.io/install
Apache License 2.0
3.64k stars 331 forks source link

Universal on kuberenetes mode - DNS error #9604

Closed brunda-bs closed 7 months ago

brunda-bs commented 7 months ago

What happened?

Hi,

We are using the kuma 2.5.2 version and trying to deploy Kuma Global CP "universal on Kubernetes" mode. We see that the init container - “migration” is not able to resolve the Postgres DNS.

However,

  1. The control-plane container in the same pod can resolve the Postgres DNS.
  2. With the same credentials, I can access the Postgres DB from local as well as other Kubernetes pods in the same cluster.

From Migration init container: ~ % kubectl logs po/kuma-control-plane-85859bcf66-4krzp -n kuma-system -c migration

Error: cannot connect to DB: failed to connect to host=[xxxx.postgres.database.azure.com] user=kuma database=kuma : hostname resolving error (lookup xxxx.postgres.database.azure.com : no such host)

From control-plane container: kubectl exec po/kuma-control-plane-7fc4d64d68-pzgsc -n kuma-system -it -- sh

~ $ wget http://xxxx.postgres.database.azure.com:5432/ Connecting to xxxx.postgres.database.azure.com:5432 (xx.xx.xx.xx:5432)

jakubdyszkiewicz commented 7 months ago

Triage: do you have any other init containers in the Pod? Can you hit any other DNS host from this init container? Does it happen in any other init container?

brunda-bs commented 7 months ago

Hi @jakubdyszkiewicz, The encrypted secret for postgres db host was misconfigured. The connectivity is working fine now. Thanks