# How to connect client to DB using HAProxy?

**URL:** <https://forums.percona.com/t/how-to-connect-client-to-db-using-haproxy/8057>\
**Category:** Percona Operator for MySQL\
**Created:** [September 21, 2020, 4:31am UTC](https://forums.percona.com/t/how-to-connect-client-to-db-using-haproxy/8057 "2020-09-21T04:31:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![te4336](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@te4336](https://forums.percona.com/u/te4336)\
**Post date:** [September 21, 2020, 4:31am UTC](https://forums.percona.com/t/how-to-connect-client-to-db-using-haproxy/8057/1 "2020-09-21T04:31:39Z")

</div>

I’ve setup an XtraDB cluster with HAProxy in front of it instead of ProxySQL and I’m trying to connect a service in my K8’s cluster to it but it says “dial tcp: lookup cluster1-haproxy on x.x.x.x:53: no such host”. Any ideas on how I can get this resolved?

---

<div class="post-metadata">

**Author:** ![Ivan\_Pylypenko](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_pylypenko/32/2452_2.png) [@Ivan\_Pylypenko](https://forums.percona.com/u/Ivan_Pylypenko)\
**Post date:** [September 21, 2020, 1:21pm UTC](https://forums.percona.com/t/how-to-connect-client-to-db-using-haproxy/8057/2 "2020-09-21T13:21:48Z")

</div>

Hi

Just to be on the same page your application and Database are running inside the same cluster and namespace?
