# Ldap queries from inside container

**URL:** <https://discuss.kubernetes.io/t/ldap-queries-from-inside-container/32592>\
**Category:** microk8s\
**Created:** [June 19, 2025, 9:40am UTC](https://discuss.kubernetes.io/t/ldap-queries-from-inside-container/32592 "2025-06-19T09:40:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cameronclaero](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/cameronclaero/32/17412_2.png) [@cameronclaero](https://discuss.kubernetes.io/u/cameronclaero)\
**Post date:** [June 19, 2025, 9:40am UTC](https://discuss.kubernetes.io/t/ldap-queries-from-inside-container/32592/1 "2025-06-19T09:40:24Z")

</div>

Hi there, I have a weird issue with a container that connects to an external ldap server. It works maybe 60% of the time, and the other ones it just times out. I have the same application running as a VM, hitting the same ldap server and it never gets any timeouts. If I change the statefulset with the container in it to use hostNetwork: true , then it connects 100% of the time and works fine.

So something is up with internal nat in kube , (using calico as part of microk8s, I did have to change the ip pools since it clashed with our internal networks). Any thoughts on what I could check . I have a 2 node, one master and one worker node. all statefulsets just live on the master node as its the only one that has storage.
