.Net microservices. Learn PROD grade project from Microsoft team

Aleksei Fedorov
3 min readMar 9, 2023

--

For those who want to dive into designing .Net microservices, Kubernetes, Azure or CI/CD. Microsoft development team released project and several e-books and the material turned out to be unusual. The peculiarity of these publications is that one PROD grade microservice project designed by top industry engineers is considered from different angles: eShopOnContainers

https://learn.microsoft.com/en-us/dotnet/architecture/cloud-native/map-eshoponcontainers-azure-services

This project is a good way to dive into the code and architecture of a microservice environment. Usually you dive into the project through one book, that is, you consider the technology from only one side. You can approach this online store project from different angles, or roles, as an Architect, DevOps, or a Developer.

Architecting Cloud Native .NET Applications for Azure

The books also deal with the problems of microservice projects: fault tolerance, scaling, caching, working with data, events, data mesh, etc. The materials are already several years old, they are being updated, new sections and books are being released

Architecting Cloud Native .NET Applications for Azure

.NET Microservices: Architecture for Containerized .NET Applications

Containerized Docker Application Lifecycle with Microsoft Platform and Tools

Enterprise Application Patterns using Xamarin.Forms eBook

Some code fragments, approaches, are outdated or sound naive. Funny the statement, in one of the books, “Docker becomes the industry standard”. No need to be upset or afraid when you meet such fragments, in real project life you will see solutions or even older code. In the industry, it is customary to criticize “imperfect” or outdated solutions, however, in developed or complex projects, they will always be.

Hands-on experience

You can not try to comprehend all the contents, here are the steps that I recommend to follow:

  1. Register Azure Free Tier: https://azure.microsoft.com/en-us/free/ or provision local environment: https://github.com/dotnet-architecture/eShopOnContainers/wiki/Deploy-to-Local-Kubernetes
  2. Deploy the application to Azure Kubernetes Service (AKS): https://github.com/dotnet-architecture/eShopOnContainers/wiki/Deploy-to-Azure-Kubernetes-Service-(AKS) or locally.
  3. Connect to Kubernetes services using Lens: https://docs.k8slens.dev/main/catalog/add-cluster/

Prepare coffee, open e-books, and dive into code, application architecture, or design issues based on your interests:

For example, a security engineer can deploy an application to Azure, set up Elastic, enable intrusion detection, Machine Learning Anomaly Detection. The result is interesting Kibana reports. There is a lot of noise on the network and your exposed IP may start to be scanned and try to apply known attacks. If you are “lucky”, attacks can go down to the data layer.

A developer can delve into cloud-native development or the architecture and the microservices interaction. If you are a system administrator and you are not interested in the code, you have a whole PROD in your hands, close to real and with simplified business logic! Moving through the sections of the books, you can ask yourself typical project questions for CI/CD (Build Code with GitHub Actions, Deploy Code with GitHub Actions, Azure DevOps Pipelines) Get acquainted with Service Mesh, deploy Elastic Stack, or for example, enable TLS.

https://learn.microsoft.com/en-us/dotnet/architecture/containerized-lifecycle/docker-devops-workflow/create-ci-cd-pipelines-azure-devops-services-aspnetcore-kubernetes

When the cloud hype went off scale, it turned out that the second and confident number in cloud services is moving Microsoft with the Azure platform, now the demand for the platform is huge. Working in the role of DevOps, I really wanted to dive into the .Net microservice development process from an architectural point of view. All the books started with “declaring a variable” or “let’s deploy an Azure service”. I really wanted to study the PROD grade project, which consists of a set of microservices, including popular frameworks and approaches. There were practically no such books or courses (share if you have seen this). There was a gap from very simple literature to very complex literature.

Even if you have very little experience, go through the 4 steps above, connect to Kubernetes services through Lens and enjoy the PROD grade environment!

Additional links:

.NET Microservices Architecture Guidance: https://dotnet.microsoft.com/en-us/learn/aspnet/microservices-architecture

Introduction to Lens — The Kubernetes IDE: https://www.youtube.com/watch?v=eeDwdVXattc

Complete Lens Course | The Best Kubernetes IDE for DevOps: https://www.youtube.com/watch?v=VOruC2tQbmw

Deploy Elasticsearch in 3 minutes or less: https://www.elastic.co/cloud/elasticsearch-service/signup

--

--