콘텐츠로 이동
Docs Try Aspire
Docs Try

Azure Kubernetes Service (AKS) integration

이 콘텐츠는 아직 번역되지 않았습니다.

The Aspire AKS hosting integration enables you to deploy your Aspire application to Azure Kubernetes Service (AKS) with full provisioning. Aspire creates the AKS cluster, Azure Container Registry (ACR), managed identity, and any Azure resources your app depends on — all from your AppHost definition.

To get started with the Aspire AKS hosting integration, install the 📦 Aspire.Hosting.Azure.Kubernetes NuGet package in the AppHost project:

Aspire CLI — Aspire.Hosting.Azure.Kubernetes 패키지 추가
aspire add azure-kubernetes

Aspire CLI는 대화형입니다. 프롬프트 시 알맞은 검색 결과 선택:

Aspire CLI — 출력 예시
Select an integration to add:
> azure-kubernetes (Aspire.Hosting.Azure.Kubernetes)
> Other results listed as selectable options...

After installing the package, add an AKS environment to your AppHost:

AppHost.cs
var builder = DistributedApplication.CreateBuilder(args);
var aks = builder.AddAzureKubernetesEnvironment("aks");
var api = builder.AddProject<Projects.MyApi>("api");
builder.Build().Run();

When an AKS environment is present, all compute resources are automatically deployed to AKS — no additional opt-in is required.

Customize the system node pool VM size and scaling using WithSystemNodePool:

AppHost.cs
builder.AddAzureKubernetesEnvironment("aks")
.WithSystemNodePool("Standard_D4s_v5", minCount: 1, maxCount: 5);

Add additional node pools for workload isolation, GPU workloads, or specialized hardware requirements:

AppHost.cs
var aks = builder.AddAzureKubernetesEnvironment("aks");
var gpuPool = aks.AddNodePool("gpupool", "Standard_NC6s_v3", minCount: 0, maxCount: 5);
builder.AddContainer("ml-worker", "my-ml-image")
.WithNodePool(gpuPool);

The AKS integration supports both aspire publish (generate Helm chart and Bicep artifacts) and aspire deploy (provision Azure infrastructure and deploy in a single command).

For a complete end-to-end walkthrough, see Deploy to AKS.