microsoft / microsoft/aspire

AKS: Support AsExisting() for pre-provisioned clusters

Open
#16,152 2 comments 0 reactions 0 assignees View on GitHub
area-deployment azure kubernetes
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

## Problem
`AsExisting()` is not implemented for `AzureKubernetesEnvironmentResource`. Users cannot reference a pre-provisioned AKS cluster — they must always provision a new one.

## Expected
```csharp
var nameParam = builder.AddParameter("aks-name");
var rgParam = builder.AddParameter("aks-rg");
var aks = builder.AddAzureKubernetesEnvironment("aks")
.AsExisting(nameParam, rgParam);
```

Should use the established `ExistingAzureResourceAnnotation` pattern and skip Bicep generation for the cluster itself while still supporting workload identity, Helm deployment, etc.

## Related
Part of AKS hosting support (PR #16088)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.