9 Deploying Aspire apps to production
This chapter covers
- Scaling out individual services in .NET Aspire
- Generating .NET Aspire manifest for distributed application deployment.
- Deploying Aspire applications to Azure Container Apps.
- Using Aspire8 to deploy Aspire apps to a Kubernetes cluster on any cloud environment.
So far, we looked at how .NET Aspire apps can be orchestrated while being built and debugged on a development machine. However, eventually, we will need to deploy the app to production.
Aspire has some built-in mechanisms for doing this. We will look at them in this chapter. The code samples we will use are available via the following address:
Before we jump into deploying Aspire apps, let us delve into some modifications of our .NET Aspire setup that would make it easier for us to manage the application once it's been deployed.
9.1 Pre-deployment modifications of Aspire-hosted systems
Why would we need to modify our system further before deploying it? Well, there may be multiple reasons to do so. For example, we may anticipate that, for certain types of services, we will always run multiple replicas. Perhaps, we are expected to deal with high user throughput, and a single replica just won’t cut it. In .NET Aspire, this can be configured in the host, as we shall see shortly.