
Explanation:
Step 1: Create an App Service plan and configure autoscale rules
Create the infrastructure: You must first create the App Service plan, which dictates the underlying virtual machines, pricing tier, and capabilities (like custom domains, scaling, and slots). Configuring autoscale rules at this stage sets the CPU thresholds required for requirement
1.
Step 2: Create the App Service and deploy the containerized application Deploy the core application (b): Once the plan exists, you create the actual App Service web app within that plan and deploy your containerized ASP.NET Core application to the production slot.
Step 3: Enable diagnostic logging for application and container logs
Enable monitoring and troubleshooting: Before routing live or staged traffic, you must enable diagnostic logging (App Service logs and container logs) to fulfill requirement 2. This ensures any startup issues or early errors are fully captured.
Step 4: Add a deployment slot for staged rollouts
Set up advanced deployment mechanics: Finally, you add a deployment slot to achieve requirement 3. This allows you to test new container versions in an isolated environment and swap them into production with zero downtime.
Reference:
https://learn.microsoft.com/en-us/visualstudio/containers/deploy-app-service