Home:ALL Converter>Creating stateful application with some identifier in Kubernetes

Creating stateful application with some identifier in Kubernetes

Ask Time:2023-01-11T20:52:32         Author:Ohad

Json Formatter

In my current application server which currently runs not in a Kubernetes environment, we use IPS in order to communicate with a specific instance of the same application agent.

the application is stateful and therefore we have to communicate each time with the same instance, with IP as an identifier.

Now we want to deploy this agent application to Kubernetes, however, because it's a stateful application I am a bit confused. How can I communicate each time I start a session with the same instance application? Can I have an IP or some another identifier of the pod? how will it work with the Ingress resource?

I looked at the Statefulset object but also did not understand how can it help me. I also looked at "sticky session", but I don't want to define an amount of time in order to define one session. I want to be able to access the same pod, and if the pod dies I want to get an exception.

How can I do it in Kubernetes? is it possible?

Author:Ohad,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/75083349/creating-stateful-application-with-some-identifier-in-kubernetes
yy