My services / pods are running behind a service, but I do not have an Ingress controller. The Request is coming from GTM -> LTM -> K8s service -> Pod. Here LTM is overriding the clientIP. Due to this, SessionAffinity with ClientIP strategy is not working.
kind: Service
metadata:
creationTimestamp: null
name: active
selfLink: /api/v1/namespaces/active
spec:
externalTrafficPolicy: Cluster
ports:
- name: port1
nodePort: 35010
port: 80
protocol: TCP
selector:
name: active-pod
sessionAffinity: ClientIP
sessionAffinityConfig:
clientIP:
timeoutSeconds: 10800
type: LoadBalancer
status:
loadBalancer: {}
I have SMCookie in the request. Is there a way I can load balance with cookie in the K8s Service. Or suggest some other options..