Is it possible to configure k8 so that based on some data in a request it is always routed to the same hostname?
Perhaps something using stateful sets? Can we do a modulo based routing so that a request like POST /myroute { _id : 1 }
will always go to one hostname,
and a request like
POST /myroute { _id : 2 } will always go to another??
Or is there away so that each host can ignore requests based on the payload. This is a pretty standard routing method, similar to a distributed hash table.
Sorry if I'm not explaining this well. But does anyone have any example of this type of k8 configuration?
You can use vulcand as Ingress controller.It has very good routing-language
Also nginx plus as Ingress can be a solution