I have keycloak installed on kubernetes by oficial helm chart. I have 2 replicas on a statefulset. I have created a realm and configure the admin-cli client to go by confidential. When I ask for a token by this client (with the correct client secret), I get the token, and when I try to create a user, sometimes the curl works, and sometimes I get an unauthorized error. I tried to set only 1 replica and always works fine, but with more than 1 replica, curl sometimes works, sometimes doesn't. I think the problem is between the pods, the sync between pods or something like this. Can anyone helps me?
Thanks