# Haproxy node port keep changing

**URL:** <https://forums.percona.com/t/haproxy-node-port-keep-changing/9503>\
**Category:** Percona Operator for MySQL\
**Tags:** mysql, percona\
**Created:** [March 2, 2021, 10:39am UTC](https://forums.percona.com/t/haproxy-node-port-keep-changing/9503 "2021-03-02T10:39:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nehemia](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/nehemia/32/3025_2.png) [@Nehemia](https://forums.percona.com/u/Nehemia)\
**Post date:** [March 2, 2021, 10:39am UTC](https://forums.percona.com/t/haproxy-node-port-keep-changing/9503/1 "2021-03-02T10:39:04Z")

</div>

I follow this [guide](https://www.percona.com/doc/kubernetes-operator-for-pxc/minikube.html) to install Percona Operator on microk8s single node machine  
All is well I am able to access the database from inside the cluster  
trying to change the service type of the haproxy to NodePort seems to work (I want to access the database outside the cluster for testing reasons)  
The issue is that the port keeps changing all the time  
This is some lines when I am running this command  
`sudo microk8s.kubectl get services -w`

```
cluster1-haproxy NodePort 10.152.183.46 <none> 3306:31742/TCP,3309:31594/TCP,33062:31712/TCP 4m1s
cluster1-haproxy NodePort 10.152.183.46 <none> 3306:32463/TCP,3309:32154/TCP,33062:31608/TCP 4m6s
cluster1-haproxy NodePort 10.152.183.46 <none> 3306:31969/TCP,3309:32474/TCP,33062:32525/TCP 4m11s
cluster1-haproxy NodePort 10.152.183.46 <none> 3306:30297/TCP,3309:30830/TCP,33062:32413/TCP 4m17s
cluster1-haproxy NodePort 10.152.183.46 <none> 3306:30178/TCP,3309:31152/TCP,33062:30276/TCP 4m22s

```

this is my haproxy config section in the cr.yaml

> ```
> haproxy:
> enabled: true
> size: 1
> image: percona/percona-xtradb-cluster-operator:1.7.0-haproxy
> serviceType: NodePort
> 
> ```

---

<div class="post-metadata">

**Author:** ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)\
**Post date:** [March 2, 2021, 11:23am UTC](https://forums.percona.com/t/haproxy-node-port-keep-changing/9503/2 "2021-03-02T11:23:18Z")

</div>

Hello @Nehemia ,

thank you for raising this. We are aware of this issue and it will be fixed in the next release.  
Please see this issue in JIRA: [[K8SPXC-609] Frequent HAProxy service updates causing issues with load balancers - Percona JIRA](https://jira.percona.com/browse/K8SPXC-609)

As a workaround please use Loadbalancer or ClusterIP instead.
