| title | Migrate Eureka Server to Eureka Server for Spring in Azure Container Apps |
|---|---|
| description | Describes how to migrate Eureka Server to Eureka Server for Spring in Azure Container Apps. |
| author | KarlErickson |
| ms.author | karler |
| ms.reviewer | dixue |
| ms.service | azure-spring-apps |
| ms.topic | upgrade-and-migration-article |
| ms.date | 08/19/2025 |
| ms.update-cycle | 1095-days |
| ms.custom | devx-track-java, devx-track-extended-java |
Migrate Eureka Server or Tanzu Service Registry to managed Eureka Server for Spring in Azure Container Apps
[!INCLUDE deprecation-note]
This article applies to: ✅ Basic/Standard ✅ Enterprise
This article describes how to migrate Eureka Server to Eureka Server for Spring in Azure Container Apps.
Azure Container Apps' managed Eureka Server for Spring offers a similar experience to Azure Spring Apps. It enables you to deploy existing Spring applications without modifying their source code and register them with the managed Eureka Server.
- An existing Azure Spring Apps Enterprise plan instance with the Tanzu Service Registry enabled.
- An existing Azure container app environment used to deploy applications. For more information, see Provision Azure Container Apps.
- A container image of the application acting as a Eureka client. If necessary, you can use the sample image
mcr.microsoft.com/javacomponents/samples/sample-service-eureka-client:latest. - Azure CLI.
To use the Managed Eureka Server for Spring, you first need to create the Eureka Server component within your Azure Container Apps environment.
To create the managed Eureka Server for Spring, use the following steps:
-
To create the Eureka Server for Spring Java component, use the following command:
az containerapp env java-component eureka-server-for-spring create \ --resource-group $RESOURCE_GROUP \ --name $EUREKA_COMPONENT_NAME \ --environment $ENVIRONMENT -
(Optional) To update the Eureka Server for Spring Java component configuration, use the following command:
az containerapp env java-component eureka-server-for-spring update \ --resource-group $RESOURCE_GROUP \ --name $EUREKA_COMPONENT_NAME \ --environment $ENVIRONMENT \ --configuration eureka.server.renewal-percent-threshold=0.85 eureka.server.eviction-interval-timer-in-ms=10000
-
Go to your container app environment in the Azure portal.
-
On the service menu, under Services, select Services.
-
Select the Configure dropdown, then select Java component.
-
On the Configure Java component pane, enter the following values:
Property Value Java component type Select Eureka Server for Spring. Java component name Enter eureka. -
Select Next.
-
On the Review tab, select Configure.
When you delete the managed Eureka Server through the Azure portal, Azure Container Apps automatically unbinds all container apps registered with it and deletes the managed Eureka Server. This behavior differs from the Azure Spring Apps Enterprise Plan, where you must manually unbind services before deleting the Tanzu Service Registry.
The container resource allocation for the managed Eureka Server in Azure Container Apps is fixed to the following values:
- CPU: 0.5 vCPU
- Memory: 1 Gi
- Replicas: 1 - not scalable
In comparison, the Azure Spring Apps Enterprise Plan Service Registry also provisions fixed resources but includes two replicas, each with 0.5 vCPU and 1 Gi memory.
Unlike the Basic/Standard plans in Azure Spring Apps, which aren't charged, the managed Eureka Server for Spring in Azure Container Apps operates under consumption-based pricing. This pricing is similar to the pricing of the Azure Spring Apps Enterprise Plan.
For more information, see the Considerations section of Tutorial: Connect to a managed Eureka Server for Spring in Azure Container Apps.
After you provision the managed Eureka Server for Spring, you can deploy your Spring application to Azure Container Apps and bind it to the Eureka Server. This process is similar to how the Enterprise Plan works in Azure Spring Apps. Specifically, you need to bind your application to the Eureka Server, which is different from the Azure Spring Apps Basic/Standard Plan where no binding is required.
Note
If you aren't using the sample image mcr.microsoft.com/javacomponents/samples/sample-service-eureka-client:latest to deploy an application, you might need to do some configuration to enable Azure Container Apps to pull images from your container registry. For example, to prepare the necessary permissions to pull images from Azure Container Registry (ACR), see the Create an Azure Container Registry section of Tutorial: Build and deploy your app to Azure Container Apps.
Use the following command to create a container application:
az containerapp create \
--resource-group $RESOURCE_GROUP \
--name $APP_NAME \
--environment $ENVIRONMENT \
--image $IMAGE \
--min-replicas 1 \
--max-replicas 1 \
--ingress external \
--target-port 8080 \
--query properties.configuration.ingress.fqdn
Use the following steps to create a container app via the Azure portal:
-
In the search bar, search for Container Apps.
-
In the search results, select Container Apps.
-
Select Create.
-
In the Basics tab, fill in values for subscription, resource group, and container app name. For deployment source, keep the default value Container image.
-
Select the Container tab and configure your container image settings.
-
Select Review and create.
If no errors are found, the Create button is enabled.
If there are errors, any tab containing errors is marked with a red dot. Navigate to the appropriate tab. Fields containing an error are highlighted in red. After you fix all errors, select Review and create again.
-
Select Create
After you successfully create the application, you can bind the application to the managed Eureka Server.
Use the following command to bind the created application to the Eureka Server:
az containerapp update \
--resource-group $RESOURCE_GROUP \
--name $APP_NAME \
--bind $EUREKA_COMPONENT_NAME \
--query properties.configuration.ingress.fqdn
Use the following steps to bind the created application to the Eureka Server via the Azure portal:
- In the Azure portal, go to your container app environment.
- On the service menu, under Services, select Services.
- From the list, select eureka.
- Under bindings, select the App name dropdown, and then select your target container app.
- Select the Review tab.
- Select Configure.
The binding injects several configurations into the application as environment variables, primarily the eureka.client.service-url.defaultZone property. This property indicates the internal endpoint of the Eureka Server Java component. For more information about other properties, see the Bind your container app to the Eureka Server for Spring Java component section of Connect to a managed Eureka Server for Spring in Azure Container Apps.
If you need to unbind your application from Eureka Server, see the Unbind your container app from the Eureka Server for Spring Java component section of Connect to a managed Eureka Server for Spring in Azure Container Apps.
After you successfully create your application and bind it to the Eureka Server, you can view the registered applications through a management dashboard. For more information, see the View the application through a dashboard section of Connect to a managed Eureka Server for Spring in Azure Container Apps.
The following screenshot shows an example of what the Eureka Server dashboard looks like:
:::image type="content" source="media/migrate-to-azure-container-apps-components-eureka/azure-container-apps-eureka-server-dashboard.png" alt-text="Screenshot of Eureka Server dashboard." lightbox="media/migrate-to-azure-container-apps-components-eureka/azure-container-apps-eureka-server-dashboard.png":::
You can view logs for the managed Eureka Server for Spring in Azure Container Apps using Log Analytics, which works similarly to the logging mechanism in Azure Spring Apps.
To view managed Eureka Server for Spring logs in Azure Container Apps, use the following steps:
-
Go to the Container App Environment page.
-
Go to Monitoring > Logging options, and, under Logs Destination, ensure Azure Log Analytics is selected.
-
Go to Monitoring > Logs.
-
(Optional) If the Log analytics scope doesn't match the one configured in Logging options, select Select scope to choose the correct log analytics workspace.
-
Enter your query into the query editor to view logs from the ContainerAppSystemLogs_CL table, as shown in the following example:
ContainerAppSystemLogs_CL | where ComponentType_s == "SpringCloudEureka" | project Time=TimeGenerated, ComponentName=ComponentName_s, Message=Log_s | take 100
:::image type="content" source="media/migrate-to-azure-container-apps-components-eureka/azure-container-apps-eureka-log-analytics.png" alt-text="Screenshot of querying log analytics for Eureka Server." lightbox="media/migrate-to-azure-container-apps-components-eureka/azure-container-apps-eureka-log-analytics.png":::
For more information on querying logs using the Azure CLI, see Monitor logs in Azure Container Apps with Log Analytics.
- External access: The managed Eureka Server for Spring in Azure Container Apps can't be accessed externally.
- Revision traffic: In Azure Container Apps' multiple revision mode, all replicas of the application registered in Eureka receive traffic.
For more information on managing Eureka Server in Azure Container Apps, see Tutorial: Connect to a managed Eureka Server for Spring in Azure Container Apps.