The full answer
The main way to serve a model as a web service on Azure is a managed online endpoint in Azure Machine Learning; Kubernetes online endpoints, batch endpoints, and general-purpose hosts such as Azure Container Apps, App Service and Azure Functions cover the other cases.
| Method | Best for | Who manages the infrastructure |
|---|---|---|
| Managed online endpoints | Most real-time APIs | Azure Machine Learning |
| Kubernetes online endpoints (AKS or Arc-enabled Kubernetes) | Teams already running Kubernetes, or models that must run on premises | You |
| Batch endpoints | Scoring large datasets asynchronously | Azure Machine Learning, on compute clusters |
| Container Apps, App Service | Your own container or web app that loads the model | Mostly Azure |
| Azure Functions | Light, event-driven scoring | Azure |
1. Managed online endpoints (the recommended default)
- Deploy a registered model with a scoring script and environment (or an MLflow model without a script) to managed CPU or GPU instances.
- Built-in autoscaling, key or Microsoft Entra token authentication, logging and monitoring.
- Several deployments behind one endpoint with traffic splitting, for blue-green releases and testing a new model on a small share of traffic, plus mirrored traffic to shadow-test.
2. Kubernetes online endpoints
- Attach an AKS or Azure Arc-enabled Kubernetes cluster as a compute target and deploy the same way.
- Gives control over networking, node types and placement, at the cost of running the cluster yourself.
3. Batch endpoints
- Not real-time: they take a pointer to data, run in parallel on a compute cluster, and write results to storage. Use them for nightly scoring of millions of rows.
4. Your own container host
- Package the model in a container with a web framework (such as FastAPI) and run it on Azure Container Apps (with scale to zero), App Service, or AKS. This suits teams with existing web deployment pipelines.
5. Azure Functions
- Suitable for small models and event-driven scoring, such as scoring each file uploaded to Blob Storage. Large models, GPUs and steady high traffic fit better elsewhere.
What changed Older material describes deploying to Azure Container Instances or AKS through the v1 SDK. CLI v1 support ended on September 30, 2025, and SDK v1 support ended on June 30, 2026, so new deployments should use the v2 CLI or SDK and online or batch endpoints.
Choosing Managed online endpoints for most real-time models; Kubernetes endpoints when you must control the cluster; batch endpoints for large offline scoring; Container Apps or Functions for simple models in an existing application stack.
Last updated 16 October 2026