MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.22k stars 21.38k forks source link

Demo/documentation for Ingress and TLS for two Razor Pages applications needed #15410

Closed spacecat closed 5 years ago

spacecat commented 6 years ago

I've followed the tutorial and everything works as expected.

The tutorial only talks about the very simple azure-samples/aks-helloworld demo application however.

How do I accomplish the same result for two ASP.NET Core 2.1 Razor Pages applications? This does not seem to be possible using the above configuration.

One side-effect is broken links for the second app with the /my-second-app path in the ingress manifest that I have specified.

404:s: https://mydomain.westeurope.cloudapp.azure.com/css/site.min.css?v=kHvJwvVAK1eJLN4w8xygUR3nbvlLmRwi5yr-OuAO90E https://mydomain.westeurope.cloudapp.azure.com/images/banner1.svg https://mydomain.westeurope.cloudapp.azure.com/images/banner2.svg https://mydomain.westeurope.cloudapp.azure.com/js/site.min.js?v=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU

The other side-effect is that when navigating to the About page I end up at https://mydomain.westeurope.cloudapp.azure.com/About instead of https://mydomain.westeurope.cloudapp.azure.com/my-secondd-app/About. Same thing with the "Contact" page.

Note: I've done nothing besides enabling docker support to my second default Razor Pages project to be able to push the image to Docker Hub so that my pods can pull that image to my cluster.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

spacecat commented 6 years ago

Or maybe it's better to use a DNS Zone explained here? https://docs.microsoft.com/en-us/azure/aks/http-application-routing

This way I can still only have one ingress.

DNS Zone costs should be minimal I think in my case.

mimckitt commented 6 years ago

Thanks for the feedback! We are currently investigating and will update you shortly.

iainfoulds commented 6 years ago

This isn't AKS-specific, rather Kubernetes ingress resource definitions. The different approaches in our ingress docs show alternate ways to deploy that ingress controller and resource, but you should still be able to edit your ingress resource to suit you purpose.

For for the scenario described, you'd likely need name-based routing, yes, rather than path-based routing shown in the doc example. Rather than specifying a single host and multiple paths, you'd have multiple hosts based on a domain name - https://kubernetes.io/docs/concepts/services-networking/ingress/#name-based-virtual-hosting

Pricing for Azure DNS, if that's what you'd like to use for a consistent management plane, can be found here - https://azure.microsoft.com/en-us/pricing/details/dns/

iainfoulds commented 5 years ago

As with https://github.com/MicrosoftDocs/azure-docs/issues/16006, I've added a backlog work item to track this request and will discuss with engineering teams to prioritize accordingly.

@MicahMcKittrick-MSFT For now, #please-close