📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

Your organisation already runs .NET services on a Kubernetes platform managed by a platform team, and a team wants to adopt Aspire. How do you evaluate it? Cover the benefits, the costs and lock-in, how it fits with existing Helm, GitOps and observability tooling, and how you would roll it out or decide against it.

Evaluating Aspire adoption: benefits for the inner loop and consistency, lock-in and version churn, fit with an existing Kubernetes platform, Helm and GitOps, observability standards, adoption options (local-only, testing, full deployment), and how to decide and measure.

Senior Architecture Advanced architecture-decisions cloud-native dotnet-aspire gitops kubernetes platform-engineering

🎯 Key points

  • Separate the concerns: local orchestration, service defaults, integration testing and deployment can be adopted independently
  • Benefits: faster onboarding, one model of the system, consistent OpenTelemetry and health set-up, distributed integration tests with DistributedApplicationTestingBuilder
  • Team impact: less time lost to environment set-up, easier pairing and debugging across services because everyone can see the same traces, and a shared vocabulary between product and platform teams
  • Lock-in is low at run time (services read plain IConfiguration and OTLP) but real in the AppHost, integration packages and generated deployment artefacts
  • On a platform-owned Kubernetes cluster the platform's Helm/GitOps stays the source of truth; Aspire is used for local dev and tests, or its Helm output is a starting point only
  • Costs: learning curve, Docker on every machine, frequent minor releases, and a second topology description that must be checked against production manifests
  • Align service defaults with the platform's telemetry and secrets conventions (OTLP to the Collector, resource attributes, sampling, Key Vault/CSI secrets) so local and production match
  • Run a time-boxed pilot with success measures (onboarding time, local set-up failures, time to first trace) and record the decision in an ADR

⏱ 30-second answer

I'd split Aspire into four parts that can be adopted separately: local orchestration (AppHost), service defaults, integration testing with the testing builder, and deployment (publish/deploy).

On a platform-owned Kubernetes cluster, the platform's Helm and GitOps stay the source of truth, so the usual answer is: adopt Aspire for the inner loop, service defaults and tests, align telemetry with the platform's OpenTelemetry Collector, and don't let Aspire deploy to the cluster. Its generated Helm chart is a reference at most.

Run-time lock-in is low because services read plain IConfiguration and send OTLP. The real costs are the learning curve, keeping up with releases, and a second topology model that can drift from production manifests. I'd decide with a time-boxed pilot, measured on onboarding time and local failures, and record it in an ADR.

🗣 Full answer (senior)

How I would answer this in an interview

"First I'd stop treating Aspire as one decision. It's really four things: an AppHost for local orchestration, a service defaults project, a testing library that starts the whole app in an integration test, and deployment publishers. Each has a different cost and a different owner. On a Kubernetes platform that a platform team runs with Helm and Argo CD, the deployment part is the one that clashes: the platform already owns ingress, network policies, resource limits and the GitOps flow, and two sources of truth for production manifests is a recipe for drift. So my default recommendation is to adopt the AppHost, service defaults and testing, and keep deployment with the platform.

For example, at [company] we [ran a four-week pilot with one team of six and three services]. I set measures up front: onboarding time, the number of 'works on my machine' tickets, and how long it took to get a trace across services locally. We aligned service defaults with the platform's conventions, OTLP to the cluster's OpenTelemetry Collector, the same service.name and deployment.environment.name attributes, so local traces matched production ones. [Onboarding went from a day and a half to under an hour, and the platform team signed off because nothing changed in their pipeline.]

On lock-in I'm fairly relaxed: services only read configuration and emit OTLP, so removing Aspire means replacing the AppHost with Compose and keeping everything else. The real costs are the learning curve, a frequent release cadence to keep up with, Docker on every laptop, and the AppHost drifting from the Helm charts. I'd reject it if the platform already provides good ephemeral dev environments, or if the team is one service with one database. I'd adopt Aspire where it removes friction for the team, and keep production decisions with the people who run production."


Adoption options

Option What you adopt Fits Watch out for
A. Local only AppHost + dashboard Any platform AppHost drifting from production topology
B. Local + service defaults A + shared OTel/health/resilience baseline Most teams Must match platform telemetry conventions
C. B + integration tests DistributedApplicationTestingBuilder in CI Teams with cross-service bugs CI needs Docker; slower tests
D. Full, including deployment aspire publish/deploy to the cluster or Container Apps Teams owning their own Container Apps or cluster Clashes with platform-owned GitOps

Benefits vs costs

Benefit Cost
Faster onboarding, one-command local run Docker/Podman and resources on every machine
Consistent telemetry and health checks Service defaults must be kept aligned with platform standards
Cross-service integration tests Longer CI runs
Readable model of the system A second topology description to keep in sync
Fast first deployment Generated artefacts to review; preview features; version churn

Production example

[A platform with 14 .NET services on AKS] adopted options A to C over a quarter. Local environment tickets fell from [about 12 a month] to [2], and an AppHost-based integration test caught a breaking contract change between two services [three times] before it reached the shared test cluster. Deployment stayed with the platform team's Helm and Argo CD.

🔍 What the interviewer is checking

Checks architectural judgement: decomposing a tool decision, respecting platform ownership, analysing lock-in honestly and deciding with evidence.

Green flags

  • Splits Aspire into separately adoptable parts.
  • Keeps GitOps/Helm as production source of truth on a platform-owned cluster.
  • Aligns telemetry with the platform's Collector and conventions.
  • Proposes a measured pilot and an ADR, and names reasons to say no.

Red flags

  • Either 'adopt everything' or 'reject because lock-in' without analysis.
  • Ignores the platform team.
  • No success measures.

📚 Learn in depth

1. Decompose the decision

            +-------------------- Aspire --------------------+
            |                                                 |
  Inner loop          Service defaults        Testing             Deployment
  (AppHost, DCP,      (OTel, health,          (Aspire.Hosting.    (publishers: Bicep,
   dashboard)          discovery, resilience)  Testing)            Helm, Compose; deploy)
      |                     |                     |                    |
  owner: team          owner: team +          owner: team         owner: whoever owns
                       platform standards                         production manifests

2. Lock-in analysis

Layer Coupling to Aspire Exit path
Service code Low: IConfiguration, ILogger, OTLP, optional client integrations Replace client integrations with plain SDK registration
Service defaults Low: it's your source code using OpenTelemetry and Microsoft.Extensions packages Keep it; rename it
AppHost High: Aspire-specific DSL Replace with Compose or Tilt/Skaffold
Generated deployment Medium: Bicep/Helm are standard formats Take ownership of the last generated output

3. Fitting a platform-owned Kubernetes cluster

  • Source of truth: GitOps repositories hold Helm values per environment. Aspire's Helm output can seed a new service's chart once, then the platform's chart conventions take over.
  • Topology drift: the AppHost says the API depends on Redis and Service Bus; the Helm values must say the same. Mitigate with a test that compares AppHost references to the chart's configured connection names, or a review checklist.
  • Configuration names: make sure the platform injects the same keys the AppHost does (ConnectionStrings__cache, services__catalog__http__0, or plain Kubernetes DNS with pass-through discovery), so code doesn't branch per environment.
  • Telemetry: the platform typically runs an OpenTelemetry Collector as a DaemonSet or gateway. Service defaults should export OTLP to it with consistent resource attributes, and local runs export to the dashboard.

4. Testing with the AppHost

DistributedApplicationTestingBuilder.CreateAsync<Projects.AppHost>() starts the whole model (containers included) inside a test, gives you an HttpClient for any resource, and lets you wait for health. It's slower than unit tests but catches wiring and contract problems no mock will. Run it in CI on a Docker-capable agent, typically on pull requests to main.

5. Running the pilot

  1. Pick one team with real pain (several services, onboarding complaints).
  2. Agree measures and a baseline: onboarding time, local environment tickets, time to first cross-service trace, CI duration.
  3. Time-box to four to six weeks; involve a platform engineer.
  4. Decide with data; write an ADR covering scope (options A to D), version policy (e.g. upgrade within a month of a minor release), and ownership of service defaults.

6. Reasons to say no

  • The platform already provides ephemeral per-branch environments or dev containers that work well.
  • Single service, single database: Compose or Testcontainers is enough.
  • Developer machines can't run Docker (locked-down SOE) and there's no remote alternative.
  • The organisation can't absorb another fast-moving dependency.

Try it yourself

  1. Write an ADR template with the four options and fill it in for a system you know.
  2. Point service defaults at a local OpenTelemetry Collector container and compare traces with the dashboard's.
  3. Write one DistributedApplicationTestingBuilder test that calls the API and asserts a healthy response.
  4. Run aspire publish with a Kubernetes environment and compare the generated chart with your platform's chart.
  5. Time a new joiner's set-up before and after introducing the AppHost.

💻 Code

Option C in practice: an AppHost-driven integration test and service defaults aligned with a platform Collector.

// tests/Orders.IntegrationTests/CheckoutFlowTests.cs
namespace Orders.IntegrationTests;

using System.Net;
using System.Net.Http.Json;
using Aspire.Hosting.Testing;

public sealed class CheckoutFlowTests
{
    [Fact]
    public async Task Checkout_returns_ok_across_services()
    {
        using var cts = new CancellationTokenSource(TimeSpan.FromMinutes(3));
        var appHost = await DistributedApplicationTestingBuilder.CreateAsync<Projects.Orders_AppHost>(cts.Token);
        await using var app = await appHost.BuildAsync(cts.Token);
        await app.StartAsync(cts.Token);

        // Wait until the API is healthy (its own WaitFor dependencies come first).
        await app.ResourceNotifications.WaitForResourceHealthyAsync("api", cts.Token);

        using var http = app.CreateHttpClient("api");
        var response = await http.PostAsJsonAsync("/checkout", new { CartId = Guid.NewGuid() }, cts.Token);

        Assert.Equal(HttpStatusCode.OK, response.StatusCode);
    }
}
// ServiceDefaults/Extensions.cs (excerpt): same telemetry shape locally and on the cluster
builder.Services.AddOpenTelemetry()
    .ConfigureResource(r => r.AddAttributes(
    [
        new("deployment.environment.name", builder.Environment.EnvironmentName),
        new("service.namespace", "orders")
    ]))
    .UseOtlpExporter();   // locally: dashboard (set by AppHost); on AKS: the platform Collector via OTEL_EXPORTER_OTLP_ENDPOINT
# Platform Helm values (owned in GitOps) inject the same keys the AppHost does locally
env:
  - name: ConnectionStrings__cache
    valueFrom: { secretKeyRef: { name: orders-redis, key: connection } }
  - name: services__catalog__http__0
    value: http://catalog.orders.svc.cluster.local
  - name: OTEL_EXPORTER_OTLP_ENDPOINT
    value: http://otel-collector.observability.svc:4317

⚠ Common mistakes

  • Mistake: Treating Aspire adoption as all or nothing. Why it is wrong: The deployment part may clash with the platform while the inner-loop parts are pure benefit. Instead: Adopt the parts independently and record the scope in an ADR.
  • Mistake: Letting Aspire deploy to a cluster whose manifests are owned in GitOps. Why it is wrong: Two sources of truth drift, and out-of-band changes get reverted or cause incidents. Instead: Keep GitOps as the source of truth; use generated Helm only as a seed.
  • Mistake: Never checking the local model against production. Why it is wrong: The AppHost can run Redis 7 locally while production runs a managed Redis with TLS and different eviction, or reference a dependency the Helm values never configure, so 'works locally' stops meaning anything. Instead: Pin container image versions to what production runs, keep a checklist or test comparing AppHost references with Helm values, and run the AppHost integration tests against real test infrastructure periodically.
  • Mistake: Service defaults that ignore the platform's telemetry conventions. Why it is wrong: Local traces look different from production ones, and dashboards and alerts break on attribute names. Instead: Agree resource attributes, exporters and sampling with the platform team.
  • Mistake: Adopting without measures. Why it is wrong: You can't tell whether it helped, and the decision becomes opinion. Instead: Baseline onboarding time and local-environment tickets, then compare after a time-boxed pilot.
  • Mistake: Overstating lock-in. Why it is wrong: Service code only uses configuration and OTLP; rejecting Aspire for lock-in reasons can throw away real benefits. Instead: Analyse coupling per layer and note the exit path.
  • Mistake: Ignoring the upgrade cadence. Why it is wrong: Aspire ships minor versions frequently; falling far behind makes upgrades painful and documentation mismatched. Instead: Set a version policy and use Central Package Management.

🏛 Senior insight: trade-offs

The senior move here is scoping: Aspire is valuable for the team's inner loop and for consistency, and the platform team's ownership of production is legitimate. Getting both teams to agree on configuration keys and telemetry conventions matters more than the tool.

Why the telemetry alignment pays off. OpenTelemetry gives every service the same trace context, attribute names and export protocol, so a request can be followed across services with one trace id, from the developer's dashboard to Grafana Tempo or Application Insights in production. When local and production telemetry share conventions, developers arrive at incidents already fluent in the traces, and instrumentation gaps are found and fixed in pull requests rather than during an outage.

Security and secrets. Aspire changes the local secrets story (user secrets and secret parameters) but must not change production's: on the cluster, secrets still come from Key Vault through the Secrets Store CSI driver or workload identity, under the platform's rotation and audit. Watch for secret parameters being copied into generated Helm values or committed aspire publish output, keep the dashboard's authentication on, and make sure local telemetry doesn't capture personal data that would be a Privacy Act problem if it leaked from a laptop.

Decision When it fits Cost When not to
Adopt A to C, platform keeps deployment Platform-owned Kubernetes with GitOps Keep AppHost and charts aligned Platform already gives great dev environments
Adopt A to D on Container Apps Team owns its Azure footprint Review generated Bicep Strict separation of duties
Compose + Testcontainers instead Polyglot teams, simple systems No dashboard or typed model .NET-heavy systems with many services
Don't adopt Locked-down machines, one service Status quo pain remains Onboarding is a real problem

🔗 Follow-ups the interviewer may ask

  1. When: Candidate mentions Aspire's deployment support Why: Checks what publish and deploy actually generate
    How to answer

    The AppHost model is the input to deployment. You add a compute environment (Azure Container Apps, Kubernetes, Docker Compose or App Service) and then:

    • aspire publish generates artefacts: Bicep for Azure, a Helm chart for Kubernetes, or Compose files, for review and your own pipeline.
    • aspire deploy builds and pushes images and applies them; for Container Apps it's still marked preview in Microsoft's docs.
    • azd up packages, provisions (Bicep) and deploys to Container Apps, and azd pipeline config creates CI/CD with federated credentials.

    Deployed apps use managed identity and secret parameters, not keys. Aspire itself doesn't run in production: the platform handles scaling, revisions, probes and networking. You still own migrations, private networking, scaling rules, environments and approvals. The trade-off: one model from laptop to cloud, versus generated infrastructure you must review and sometimes override.

  2. When: Candidate mentions Helm and GitOps Why: Checks Helm knowledge
    How to answer

    Helm is the package manager for Kubernetes. A chart is a set of manifest templates (Go templating) plus a values.yaml of defaults. You install it as a release, overriding values per environment with files like values-prod.yaml. Helm stores each revision in the cluster, so helm upgrade --install --atomic deploys and helm rollback returns to an earlier revision. Charts are versioned and pushed to OCI registries such as Azure Container Registry.

    Kustomize takes the opposite approach: plain YAML bases with environment overlays and patches, no templating, built into kubectl apply -k.

    I use Helm when a chart is shared across many services or for third-party software, and Kustomize for simple in-house overlays. The trade-off: Helm's power versus template complexity.

  3. When: Candidate mentions the platform's OpenTelemetry Collector Why: Checks tracing backends and the Collector
    How to answer

    All of them store and show traces; they differ in who runs them and how they price and store data.

    • Application Insights: managed by Azure, correlates traces with logs, exceptions and metrics, gives you Application Map and KQL. You pay per GB ingested and retained.
    • Jaeger v2: open source, built on the OpenTelemetry Collector, ingests OTLP natively; you run it and its storage (Elasticsearch/OpenSearch or Cassandra).
    • Grafana Tempo: stores traces in object storage, so it's cheap at high volume, and pairs with Prometheus and Loki.
    • Zipkin: older and simpler; OpenTelemetry has deprecated its Zipkin exporter, so send OTLP instead.

    From .NET you instrument once with OpenTelemetry and export OTLP, ideally through a Collector that can batch, sample and fan out. The trade-off: managed backends cost money per GB; self-hosted ones cost engineering time.

🛠 Real-world problems: how you handle them

Aspire pilot on a platform-owned AKS cluster without breaking GitOps
Situation
[A payments organisation] with [14 .NET services] on AKS in Australia East, deployed by a platform team through Helm and Argo CD. One product team of [six] wanted Aspire after onboarding took [a day and a half].
Signals
Onboarding complaints, [about 12] local-environment tickets a month, and platform team concern that Aspire would bypass their deployment controls.
Investigation
Mapped which Aspire parts touched what; compared the AppHost's configuration keys with the Helm values; ran a spike pointing service defaults at the cluster's OpenTelemetry Collector and compared trace attributes in Grafana Tempo; measured onboarding with a new joiner.
Resolution
Adopted the AppHost, service defaults and testing; agreed configuration keys and telemetry attributes with the platform team; deployment stayed in Argo CD. Added one AppHost integration test to the pull request pipeline.
Prevention
ADR recording scope and version policy; review checklist item that new AppHost references must have matching Helm values; quarterly review of service defaults with the platform team.

How to tell it (STAR)

**S:** At [company], a team on our platform-owned AKS cluster wanted Aspire, and the platform team was worried it would bypass GitOps. **T:** As [principal engineer], I had to decide whether and how to adopt it without creating two sources of truth. **A:** I split Aspire into its parts, ran a [four-week] pilot using only the AppHost, service defaults and testing, aligned configuration keys and telemetry with the platform's Collector, and left deployment in Argo CD. I wrote the outcome up as an ADR. **R:** Onboarding fell from [a day and a half] to [under an hour], local-environment tickets dropped by [about 80%], and the platform team approved rolling it out to [three] more teams.

↩ Usually asked after

More in .NET Aspire

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me