dotnet-architecture / eShopOnContainers

Cross-platform .NET sample microservices and container based application that runs on Linux Windows and macOS. Powered by .NET 7, Docker Containers and Azure Kubernetes Services. Supports Visual Studio, VS for Mac and CLI based environments with Docker CLI, dotnet CLI, VS Code or any other code editor. Moved to https://github.com/dotnet/eShop.
https://dot.net/architecture
24.53k stars 10.35k forks source link

k8s: Use ingress controller instead custom frontend service #467

Closed eiximenis closed 6 years ago

eiximenis commented 6 years ago

Using ingress controller is the recommended way in k8s to expose services.

This issue is just to track the implementation and related issues of the ingress controller which is in the branch ingress.

@CESARDELATORRE ingress is ready. Once you tested the branch just feel free to comment.

@SychevIgor your review is welcome too :)

PS: Wiki has ingress branch also with updated doc.

PS2: if you prefer a PR just let me know, and I do it.

SychevIgor commented 6 years ago

As an idea- I really like that we can use something native for k8 instead of custom wheel. 100% agree with you!

I will try too look and test it carefully on this week.

SychevIgor commented 6 years ago

@eiximenis - you also have branch Ocelot apigw on top of ingresscontrollers. Do Ocelot support Application Insights telemetry? because API GW now is a single point of failure as a GW and it will be nice ti monitor it.

SychevIgor commented 6 years ago

@eiximenis also nice feature is service discovery http://ocelot.readthedocs.io/en/latest/features/servicediscovery.html what do you think about it? now we have a lot of places in an app where we are using urls from config and overriding it via environment veriable. maybe we can put part of this info to services discovery. It's only an idea to discuss.

SychevIgor commented 6 years ago

@eiximenis also maybe for call outside of clusters- we will can use http://ocelot.readthedocs.io/en/latest/features/qualityofservice.html to simplify our circuit breaker ? now it's implemented on caller side(xamarin for example).

unaizorrilla commented 6 years ago

Hi @SychevIgor,

ServiceDiscovery only work with Consul and this is not deployed. @eiximenis you have any plan to include in k8s?

eiximenis commented 6 years ago

Hi. About deploying Consul and enable service discovery would be a good idea, but AFAIK Consul do not support Windows Containers (update: I found https://github.com/StefanScherer/dockerfiles-windows/tree/master/consul but I need to evaluate it). Althought our current k8s deployment is only for Linux Containers if we use Ocelot+Consul for service discovery we should to find something similar for SF+Windows Containers scenario.

eiximenis commented 6 years ago

Merged to dev (46151880575f60796b7b05fd83f5d5bcd576923f)