Architecture overview - Arthyon/microservice-poc GitHub Wiki

The architecture can be described in three parts: Local, deployment and in the Cloud.

Local Architecture

Locally, the Helm-chart will be deployed into a Kubernetes cluster (usually using Minikube or Docker for Windows). Each service will be deployed into a pod and have a corresponding service.

The externally available part is the ingress, which is used to route requests to the correct service.

The local Dockerfile is dependent on making the local volume available to Kubernetes. Each container inside the pod will be able to see its own section of the local volume.

Deployment

The deployment is split into two: building Docker Images based on source and deploying to Kubernetes using Helm Charts. Deployments are triggered manually pr. service in Azure DevOps. The cloud Dockerfile is used to build the container image, publish it to our private container registry and publish the OpenApi-specification for the service as a build artifact.

The deploy is a single pipeline depending on all service build artifacts. We are inserting environment variables into the Helm-chart to match the environment and applying the chart to the Kubernetes cluster. Kubernetes will figure out which services that should be updated and only roll out updates for those. Afterwards, a small powershell script is run pr. service to update the Api endpoints in Azure Api Management.

Cloud Architecture

The cloud architecture is very similar to the local architecture. There is a Kubernetes service with an ingress. This ingress is not publicly available in the cloud. All parts of the following diagram is in the same vnet, and the only publicly available endpoint is to the Azure Management Api.

The Azure Management Api has a fallback route, which means that all non-matching routes are rerouted to an existing monolith and handled there. This enables us to chip away at the monolith by rolling out a few endpoints at a time. All other Apis are routed to the Kubernetes-cluster. The Api-routes should correspond to the ingress-routes.