'Can a stateful api be deployed on k8s replicaset?

I am developing a stateful api in the java/spring-boot environment. I am planning on using a UUID in the request to keep track of requests but since I'm relatively new to K8s was wondering how this would work across replicasets or even clusters. (I am aware that REST is by definition stateless. My use case demands it be stateful.)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source