Repository navigation
Issue Publishing Aspire Application to Kubernetes: "The endpoint is not allocated for the resource" #20125
Replies: 1 comment
|
Publishing a manifest is precisely what #7051's accepted answer addresses, so it applies to the eager-evaluation problem here, not just runtime startup.
I tested the actual Aspire.Hosting 13.5.3 assembly offline: the eager Host/Port reads threw your allocation error, while the composed expression retained |
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I've been using Aspire successfully for local development and recently started exploring deployment to Kubernetes using the
aspire publishcommand.While the application runs correctly with
aspire run, publishing Kubernetes artifacts fails with endpoint allocation errors:What I've Found
I found a few related discussions, but they appear to be focused on runtime scenarios rather than failures during
aspire publish:http/httpsis not allocated for the resource #4868In my case, the application starts and runs locally without issue. The problem only occurs during artifact generation via:
Scenario
My Aspire application contains:
WireMock Configuration
Initially, I encountered issues loading mappings during publish because Kubernetes does not support the local bind mount approach used during development. To work around that, I added conditional configuration:
WithMappingsPath(...)This resolved the mappings issue, but I now encounter endpoint allocation errors during publishing.
Where the Error Occurs
The failures appear to be tied to the following endpoint lookups:
These endpoints are then used when configuring environment variables for the API:
Question
Is there something different about endpoint resolution during
aspire publishversus local execution?Specifically:
GetEndpoint()inAppHost.cssupported when generating Kubernetes artifacts?AppHost
Versions
13.5.313.5.3-preview.1.26425.313.5.31.12.0net10.0Any guidance would be appreciated.
I'm trying to understand why endpoint resolution succeeds during local execution but fails during
aspire publish, and whether there is a Kubernetes-specific pattern that should be used instead.All reactions