OpenShift's haproxy as IPv6 ingress

Kubernetes networking always struck me as some PoC mistakenly put into production. Among questionable design choices, Internet Protocol version 6 is hardly supported. But when using OpenShift's default router – haproxy – you can easily handle IPv6 at your ingress.

With recent version is even easier than before. I've started following Customizing HAProxy Router Guide, but after extracting config template I've discovered that all the ground work has been prepared already, for v3.7 and up.

OpenShift's HAProxy container reacts to ROUTER_IP_V4_V6_MODE environment variable. When set to v4v6, the router will gladly accept connections in both IP versions, legacy and v6.

You should oc -n default edit dc/router and in the long block of envvars add this:

- name: ROUTER_IP_V4_V6_MODE
  value: "v4v6"

While editing this, you may want to add ROUTER_ENABLE_HTTP2=true, too.


Comments powered by Disqus