# Is using Keycloak embedded with spring boot a bad idea or not?

**URL:** <https://forum.keycloak.org/t/is-using-keycloak-embedded-with-spring-boot-a-bad-idea-or-not/21673>\
**Category:** Miscellanaeous\
**Tags:** clustering\
**Created:** [April 24, 2023, 11:49am UTC](https://forum.keycloak.org/t/is-using-keycloak-embedded-with-spring-boot-a-bad-idea-or-not/21673 "2023-04-24T11:49:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rasoolghafari](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/rasoolghafari/32/6496_2.png) [@rasoolghafari](https://forum.keycloak.org/u/rasoolghafari)\
**Post date:** [April 24, 2023, 11:49am UTC](https://forum.keycloak.org/t/is-using-keycloak-embedded-with-spring-boot-a-bad-idea-or-not/21673/1 "2023-04-24T11:49:22Z")

</div>

I working on a legacy project that uses Keycloak 11. recently, I found [this repository](https://github.com/thomasdarimont/embedded-spring-boot-keycloak-server) I realized that we can use Keycloak embedded with Spring Boot. So, I moved the project this way but there was a problem. When I tried to make it clustered I faced a problem described here on [stackoverflow.com](http://stackoverflow.com/):

> <https://stackoverflow.com/questions/76042828/keycloak-doesnt-work-properly-when-clustered-on-kubernetes-and-sometimes-get-40>

When I sent this question to someone that working on keycloak, they said that this isn’t a good idea because the upstream project (Keycloak) doesn’t support this way.

So, I want to know what to do and what not to do. how can I solve my problem and what will happen when I upgrade the version of keycloak from 11 to newer (e.g. 21) in this way?

As Keycloak said on their website, they are using Quarkus on the newer version. can I use the new version of Keycloak embedded with Spring Boot?
