-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Session affinity not working correctly #624
Comments
@mattiamondini Are your Netscaler and Kubernetes cluster nodes in the same network? |
@apoorva-05
i've understood this, but on other ingress controllers i read that in case of session affinity configuration , the affinity is propagated also in teh service balance in some ways. there's a way to achieve session affinity from ingress to pod with teh netscaler ingress controller? |
It's possible for services with However, we'll explore whether there's a way to achieve this for the NodePort service itself. |
@apoorva-05 |
@mattiamondini
If you're interested, we'd be delighted to schedule a call to delve deeper into your topology to explore and recommend the optimal deployment solution tailored to your specific use case. |
@apoorva-05 having a meeting would be great, improve the solution or any suggestion is appreciated. |
hi @mattiamondini, |
Setting up session affinity following the guide https://docs.netscaler.com/en-us/citrix-k8s-ingress-controller/how-to/session-affinity.html creates the correct configuration on Netscaler but traffic is still loadbalanced with round robin on kubernetes side. this cause application that requires session affinity not working properly.
To Reproduce
Steps:
`from flask import Flask
import pprint
import os
class LoggingMiddleware(object):
def init(self, app):
self._app = app
app = Flask(name)
@app.route('/')
def hello_world():
return f"Hello from {os.environ['HOSTNAME']}"
if name == 'main':
app.wsgi_app = LoggingMiddleware(app.wsgi_app)
app.run(host='0.0.0.0', port=8080)
`
2.set up the app with services and ingress like:
`apiVersion: v1
kind: Service
metadata:
name: myapp-frontend
spec:
type: NodePort
ports:
targetPort: 8080
selector:
app: myapp-frontend
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: myapp-frontend
annotations:
ingress.citrix.com/preconfigured-certkey : '{"certs": [ {"name": "mycert", "type": "sni"} ] }'
ingress.citrix.com/lbvserver: '{"myapp-frontend":{"persistenceType":"SOURCEIP", "timeout":"10"}}'
spec:
tls:
rules:
http:
paths:
pathType: Prefix
backend:
service:
name: myapp-frontend
port:
number: 80
`
Ingres controller version is 1.31.3 with Netscaler VPX version NS13.0 91.13.nc
Expected behavior
traffic is balanced according the stickiness policy defined in the ingress annotations
The text was updated successfully, but these errors were encountered: