Answer the question
In order to leave comments, you need to log in
How to organize the forwarding of several requests from one user to one POD?
Good afternoon,
Given:
* POD with two TCP ports: 80 (for websocket) and 1935 (rtmp) and several of its replicas
Task:
* Send all client requests to one POD (for example, if there is already connection 80, then send 1935 to that or POD). For clarity, information about the stream from the RTMP port flies over the websocket.
Here's the Kubbernetes organization chart:
Disclaimer: I know that keeping state is bad when working with k8s, but that's exactly the task.
PS What I tried to do:
* Ingress Nginx supports tcp proxying, but does not support (at least I did not find how to do it in version 0.30) specifying balancing parameters (round-robin, hash-ip, etc.) tcp.
* I considered the option with haproxy as an ingress, but I did not find it in principle to support tcp proxying, i.e. offer to raise Service with NodePort type (but then requests fly past haproxy)
Answer the question
In order to leave comments, you need to log in
Have you looked at "nginx.ingress.kubernetes.io/affinity"? (didn't use it myself)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question