# Two elk stack in same kubernetes cluster having agent port conflict

**URL:** <https://discuss.elastic.co/t/two-elk-stack-in-same-kubernetes-cluster-having-agent-port-conflict/363776>\
**Category:** Elastic Agent\
**Created:** [July 25, 2024, 10:04am UTC](https://discuss.elastic.co/t/two-elk-stack-in-same-kubernetes-cluster-having-agent-port-conflict/363776 "2024-07-25T10:04:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pop\_Adrian](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pop_adrian/32/127806_2.png) [@Pop\_Adrian](https://discuss.elastic.co/u/Pop_Adrian)\
**Post date:** [July 25, 2024, 10:04am UTC](https://discuss.elastic.co/t/two-elk-stack-in-same-kubernetes-cluster-having-agent-port-conflict/363776/1 "2024-07-25T10:04:58Z")

</div>

Hello,

I have an elk stack deployed from helm `eck-stack` repo and I wanna setup the second one in a new namespace

The problem is that the agents will start with the same port and I got `Error: could not start the HTTP server for the API: listen tcp 127.0.0.1:6791: bind: address already in use`

Is there a way to change the agent port in fleet config, in the `xpack.fleet.agentPolicies` section of [Kibana resource](https://github.com/elastic/cloud-on-k8s/blob/2af668fac5faca3306577c3fbe864eecc68de940/config/recipes/elastic-agent/fleet-kubernetes-integration.yaml#L23-L34)?

thanks
