charts
charts copied to clipboard
Syslog logging doesn't work in a dual-stack or IPv6-only cluster
In a dual-stack (or IPv6 only) cluster, localhost
resolves to ::1
. HAProxy is configured to log to localhost:514
and dutifully sends log messages to [::1]:514
, but the whereisaaron/kube-syslog-sidecar
listens only on the IPv4 0.0.0.0
address. Thus, the messages go nowhere:
10:01:39.195717 IP6 ::1.48755 > ::1.514: SYSLOG local0.info, length: 258
10:01:39.195739 IP6 ::1 > ::1: ICMP6, destination unreachable, unreachable port, ::1 udp port 514, length 314
A quick workaround for dual-stack clusters would be to change the localhost
address to 127.0.0.1
, but that wouldn't help IPv6-only clusters. Ideally the latter image would switch to using ::
to listen, or have a configurable listen address.
Another potential workaround that I've just thought of is to use the "external" HAProxy, which can instead log to its own stdout. I'll give that a try and report back.
Another potential workaround that I've just thought of is to use the "external" HAProxy, which can instead log to its own stdout. I'll give that a try and report back.
Yep, this works fine.