Closed Govind10g closed 2 months ago
Hi @dkorunic -
Can you help me on this issue ?
Hi, this issue is not really related to Helm Chart. That aside, you are trying to bind peer IP which is not local IP address. More specific:
Defines a peer inside a peers section.
If <peername> is set to the local peer name (by default hostname, or forced
using "-L" command line option or "[localpeer](https://www.haproxy.com/documentation/haproxy-configuration-manual/latest/#localpeer)" global configuration setting),
HAProxy will listen for incoming remote peer connection on the provided
address. Otherwise, the address defines where to connect to in order to join
the remote peer, and <peername> is used at the protocol level to identify and
validate the remote peer on the server side.
During a soft restart, local peer address is used by the old instance to
connect the new one and initiate a complete replication (teaching process).
It is strongly recommended to have the exact same peers declaration on all
peers and to only rely on the "-L" command line argument or the "[localpeer](https://www.haproxy.com/documentation/haproxy-configuration-manual/latest/#localpeer)"
global configuration setting to change the local peer name. This makes it
easier to maintain coherent configuration files across all peers.
Please refer to the HAProxy configuration reference for more information.
Hi Thank you so much for the reply.
If you see my peers configuration, as mentioned below -
peers haproxy-peers
# peer <peer_name> <ip:port>
peer i-012345 haproxy-1.ha-proxy.svc.cluster.local:1024
peer i-012367 haproxy-2.ha-proxy.svc.cluster.local:1024
I m using service url to reach to my HA-proxy pod 1 and pod 2 respectively and my understanding is that it will try to sync both pods of HA proxy pod and I can't provide the IP which is dynamic in the case of kubernetes.
then my doubt is if I m passing the service url, it should resolve to the Ha proxy pod right instead of service resolving to the Cluster-IP of service ?
How do you suggest to write peers in the ha proxy config in Kubernetes deployment ?
I think @Govind10g 's last question is a legitimate question. If I can't find the information myself I'll open an issue to discuss it further because, as far as I know, there is no way to use peers
in a Deployment right now.
Hi Team,
Hi Team,
I m running multiple HA proxy pod and trying to understand if HA proxy pods are in sync using peers concept. When trying to execute below show command, I m not able to find anything :-
/ # echo “show peers” | socat stdio /var/run/haproxy.sock
though peers info is set in the config but no output. below is my configuration :-
On further debugging, I m seeing Alert and warning in the haproxy command output, mentioned below :-
Could you please guide me what is wrong here ?
Also how we can check the status of haproxy as I’m not able to see anything with using haproxy or haproxy.service in the pod.