A10w.Aspire.Hosting.ExternalAks
0.0.1-alpha20
This is a prerelease version of A10w.Aspire.Hosting.ExternalAks.
dotnet add package A10w.Aspire.Hosting.ExternalAks --version 0.0.1-alpha20
NuGet\Install-Package A10w.Aspire.Hosting.ExternalAks -Version 0.0.1-alpha20
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="A10w.Aspire.Hosting.ExternalAks" Version="0.0.1-alpha20" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="A10w.Aspire.Hosting.ExternalAks" Version="0.0.1-alpha20" />
<PackageReference Include="A10w.Aspire.Hosting.ExternalAks" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add A10w.Aspire.Hosting.ExternalAks --version 0.0.1-alpha20
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: A10w.Aspire.Hosting.ExternalAks, 0.0.1-alpha20"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package A10w.Aspire.Hosting.ExternalAks@0.0.1-alpha20
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=A10w.Aspire.Hosting.ExternalAks&version=0.0.1-alpha20&prerelease
#tool nuget:?package=A10w.Aspire.Hosting.ExternalAks&version=0.0.1-alpha20&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
A10w.Aspire.Hosting.ExternalAks
A10w.Aspire.Hosting.ExternalAks is a .NET Aspire hosting extension that lets your AppHost represent an external service running in AKS by starting a local kubectl port-forward process.
What It Provides
AddExternalAksService(...)extension for Aspire AppHost- A custom Aspire resource for the external AKS-backed service
- Local endpoint and connection string support for service discovery
- Included PowerShell helper script used to run
kubectl port-forward
Installation
dotnet add package A10w.Aspire.Hosting.ExternalAks
Basic Usage
var builder = DistributedApplication.CreateBuilder(args);
var documentsService = builder.AddExternalAksService("svc-documents", options =>
{
options.KubernetesContext = "tst-services-cluster-uks-aks";
options.KubernetesNamespace = "dev-documentsservice";
options.KubernetesServiceName = "svc-documents";
options.LocalPort = 8999;
// options.RemotePort = 80; // optional, defaults to 80
});
builder.Build().Run();
Configuration
Required options:
KubernetesContextKubernetesNamespaceKubernetesServiceNameLocalPort
Optional options:
RemotePort(default:80)
Prerequisites
- PowerShell (
pwsh) available on your machine kubectlinstalled and onPATH- Access to the target AKS cluster and namespace
Health Checks
You can add health checks in AppHost as usual. In this package, WithHttpHealthCheck(...) on the external AKS resource forwards to the child external service resource.
Notes
- The package includes
Scripts/setup-port-forward.ps1undercontentFiles/any/any/Scripts. - The extension validates option values before creating resources.
- On startup, the custom resource transitions to
Runningthrough Aspire lifecycle notifications.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Aspire.Hosting.AppHost (>= 13.1.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.1-alpha20 | 118 | 3/9/2026 |
| 0.0.1-alpha07 | 72 | 3/9/2026 |
| 0.0.1-alpha05 | 75 | 3/9/2026 |
| 0.0.1-alpha04 | 80 | 3/8/2026 |
| 0.0.1-alpha03 | 85 | 3/7/2026 |