you can do that, e.g. by using a pod exposed with a NodePort for it where it just uses the host IP/port you configure and forwards to pods (the internal network) using whatever config HAProxy needs
or use the Gateway/Ingress abstractions that basically do this automatically, where you just expose services via them, and they handle the routing
looks like the above is documented at: https://www.haproxy.com/documentation/kubernetes-ingress/
the nodeport way would basically be what you'd do with compose, where you map the host (node) ports to the container ones
Re:Talos Linux
by globular-toast on Wednesday November 18, 2026 @09:30AM
(#50546749)
If you want to do L7 routing, aka virtual hosts, then K8s comes with support for that built in via the Ingress resource, or the new Gateway API. To realise it you need an ingress controller installed in your cluster. It's so common that K3s comes with one out of the box by default: Traefik. For a single node that's all you need.
For load balancing across a proper cluster then you can either provision an external load balancer (like keepalived) or you can look into something like MetalLB which runs entirely on-cluster (but you need BGP support for true load balancing).
In a cloud cluster (like AWS EKS) you get load balancers automatically just by provisioning a LoadBalancer type Service in Kubernetes.
Yeah that's what I thought. Perhaps just put HAProxy in front and then let k3s know about it?