How to migrate SpringBoot App to Kubernetes Replica Sets?

Siegfried Heintze 1,861 Reputation points
2020-10-14T03:06:26.147+00:00

I would like some guidance and recommendations on taking a spring boot app like ms-identity-java-webapp and exposing it in a replica set in a kubernetes cluster.

(1) How do I share the authentication/authorization state of the current AAD B2C session across multiple instance of the web server in the kubernetes replica set? Is redis a candidate? Is it a favorite? Are there any tutorials for doing this?
(2) How do I share the HTTP session state (session cookies and JWT tokens) across multiple instances of the web server in the kubernetes replica set? Is redis a candidate? Is it a favorite? Are there any tutorials for doing this?
(3) As part of my effort to port a ASP.NET Core/Kestrel web app to a Kubernetes replica set, I have learned (see overview of ASP.NET Core Data Protection) I have to call .NET functions PersistKeysToAzureBlobStorage and ProtectKeysWithAzureKeyVault. Are there counterparts to these functions that I must call for a spring boot application? Are there any tutorials for calling the java counterparts to these functions?
(4) To accommodate Kubernetes Ingress, C# .NET web apps need to call UsePathBase to remove the extra segment that Ingress adds to the beginning of the path.... Yes it is true that you can have ingress remove it, but then it is not possible to have Ingress host multiple sites that each have their own unique copy of static files like jquery.min.js.... How do I translate the UseBasePass call to java/springboot? see microsoft.aspnetcore.builder.usepathbaseextensions.usepathbase

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,900 questions
Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,683 questions
{count} votes