Skip to content

Instantly share code, notes, and snippets.

@aman-tiwari
aman-tiwari / https-sticky.md
Created August 1, 2016 21:37 — forked from bprashanth/https-sticky.md
https sticky sessions

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"