Create a backend service that simply serves the pod name, and a frontend haproxy instance that balances based on client cookies.
# This is the backend service
apiVersion: v1
kind: Service
metadata:
name: hostname
annotations:
# Enable sticky-ness on "SERVERID"
serviceloadbalancer/lb.cookie-sticky-session: "true"