# sherifemad20/azure-aks-python-microservices-devops architecture

> Architecture diagram of the GitHub repository sherifemad20/azure-aks-python-microservices-devops, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sherifemad20/azure-aks-python-microservices-devops
- Repository: https://github.com/sherifemad20/azure-aks-python-microservices-devops

## Overview

This repository is primarily a deployment blueprint for Azure-hosted Python microservices, rather than a complete application source tree. Its documented workflow provisions a self-hosted GitHub runner, provisions the application platform, then uses GitHub Actions to build and deploy the service; ingress, certificates, and monitoring provide supporting capabilities. The application package imported by run.py is absent from the supplied tree, so its internals cannot be mapped. Relationships below follow the README; unsampled Terraform and Kubernetes implementation details are not inferred.

Main entry points: [`Terraform/main.tf`](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Terraform/main.tf) (Platform provisioning), [`.github/workflows/pipeline.yaml`](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/.github/workflows/pipeline.yaml) (Build and deploy), [`Terraform/modules/aks/main.tf`](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Terraform/modules/aks/main.tf) (AKS cluster), [`github-runner/k8s.yaml`](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/github-runner/k8s.yaml) (Runner StatefulSet)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runner["Self-hosted runner"]
  node_runner_tf["Runner provisioning<br/>[main.tf]"]
  node_runner_vm["Runner VM<br/>[main.tf]"]
  node_runner_manifest["Runner StatefulSet<br/>[k8s.yaml]"]
  node_runner_start["Runner startup<br/>[start.sh]"]
end

subgraph group_platform["Azure application platform"]
  node_platform_tf["Platform provisioning<br/>[main.tf]"]
  node_acr["Container registry<br/>[main.tf]"]
  node_aks["AKS cluster<br/>[main.tf]"]
  node_helm["Helm platform charts<br/>[main.tf]"]
end

subgraph group_delivery["Application delivery"]
  node_app_workflow["Build and deploy<br/>[pipeline.yaml]"]
  node_app_image["Python service image"]
  node_app_deploy["Kubernetes deployment<br/>[Deployment.yaml]"]
end

subgraph group_operations["Traffic and observability"]
  node_ingress["NGINX ingress<br/>[main.tf]"]
  node_cert["Certificate issuers"]
  node_prometheus["Prometheus monitoring<br/>[main.tf]"]
  node_grafana["Grafana dashboards<br/>[main.tf]"]
end

node_operator(("Operator"))
node_github(("GitHub Actions"))
node_azure["Azure services"]

node_operator -->|"applies first"| node_runner_tf
node_runner_tf -->|"provisions runner"| node_azure
node_operator -->|"deploys StatefulSet"| node_runner_manifest
node_runner_vm -->|"hosts on k3s"| node_runner_manifest
node_runner_manifest -.->|"starts runner"| node_runner_start
node_operator -->|"applies second"| node_platform_tf
node_platform_tf -->|"provisions platform"| node_azure
node_platform_tf -.->|"creates registry"| node_acr
node_platform_tf -.->|"creates cluster"| node_aks
node_platform_tf -.->|"installs charts"| node_helm
node_github -->|"triggers workflow"| node_app_workflow
node_app_workflow -->|"builds image"| node_app_image
node_app_workflow -->|"pushes image"| node_acr
node_app_workflow -->|"deploys application"| node_app_deploy
node_app_deploy -->|"runs on cluster"| node_aks
node_operator -->|"applies issuers"| node_cert
node_aks -->|"routes through"| node_ingress
node_aks -->|"hosts monitoring"| node_prometheus
node_prometheus -->|"visualizes metrics"| node_grafana

click node_runner_tf "https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/github-runner/Terraform/main.tf"
click node_runner_vm "https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/github-runner/Terraform/modules/virtual_machine/main.tf"
click node_runner_manifest "https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/github-runner/k8s.yaml"
click node_runner_start "https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/github-runner/start.sh"
click node_platform_tf "https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Terraform/main.tf"
click node_acr "https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Terraform/modules/acr/main.tf"
click node_aks "https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Terraform/modules/aks/main.tf"
click node_helm "https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Terraform/modules/helm_charts/main.tf"
click node_app_workflow "https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/.github/workflows/pipeline.yaml"
click node_app_image "https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Dockerfile"
click node_app_deploy "https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Deployment_k8s/Deployment.yaml"
click node_ingress "https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Terraform/modules/helm_charts/main.tf"
click node_cert "https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Deployment_k8s/ClusterIssuers/cluster-issuer-prod.yaml"
click node_prometheus "https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Terraform/modules/helm_charts/main.tf"
click node_grafana "https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Terraform/modules/helm_charts/main.tf"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_runner_tf,node_runner_vm,node_runner_manifest,node_runner_start toneBlue
class node_platform_tf,node_acr,node_aks,node_helm toneAmber
class node_app_workflow,node_app_image,node_app_deploy toneMint
class node_ingress,node_cert,node_prometheus,node_grafana toneRose
class node_operator,node_github,node_azure toneIndigo
```

## Components

### Self-hosted runner

- [Runner provisioning](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/github-runner/Terraform/main.tf): `github-runner/Terraform/main.tf`
- [Runner VM](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/github-runner/Terraform/modules/virtual_machine/main.tf): `github-runner/Terraform/modules/virtual_machine/main.tf`
- [Runner StatefulSet](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/github-runner/k8s.yaml): `github-runner/k8s.yaml`
- [Runner startup](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/github-runner/start.sh): `github-runner/start.sh`

### Azure application platform

- [Platform provisioning](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Terraform/main.tf): `Terraform/main.tf`
- [Container registry](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Terraform/modules/acr/main.tf): `Terraform/modules/acr/main.tf`
- [AKS cluster](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Terraform/modules/aks/main.tf): `Terraform/modules/aks/main.tf`
- [Helm platform charts](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Terraform/modules/helm_charts/main.tf): `Terraform/modules/helm_charts/main.tf`

### Application delivery

- [Build and deploy](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/.github/workflows/pipeline.yaml): `.github/workflows/pipeline.yaml`
- [Python service image](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Dockerfile): `Dockerfile`
- [Kubernetes deployment](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Deployment_k8s/Deployment.yaml): `Deployment_k8s/Deployment.yaml`

### Traffic and observability

- [NGINX ingress](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Terraform/modules/helm_charts/main.tf): `Terraform/modules/helm_charts/main.tf`
- [Certificate issuers](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Deployment_k8s/ClusterIssuers/cluster-issuer-prod.yaml): `Deployment_k8s/ClusterIssuers/cluster-issuer-prod.yaml`
- [Prometheus monitoring](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Terraform/modules/helm_charts/main.tf): `Terraform/modules/helm_charts/main.tf`
- [Grafana dashboards](https://github.com/sherifemad20/azure-aks-python-microservices-devops/blob/main/Terraform/modules/helm_charts/main.tf): `Terraform/modules/helm_charts/main.tf`

### Other components

- **Operator**
- **GitHub Actions**
- **Azure services**

## Connections

- Operator → Runner provisioning: applies first (evidence: `README.md`)
- Runner provisioning → Azure services: provisions runner (evidence: `README.md`)
- Operator → Runner StatefulSet: deploys StatefulSet (evidence: `README.md`)
- Runner VM → Runner StatefulSet: hosts on k3s (evidence: `README.md`)
- Runner StatefulSet → Runner startup: starts runner
- Operator → Platform provisioning: applies second (evidence: `README.md`)
- Platform provisioning → Azure services: provisions platform (evidence: `README.md`)
- Platform provisioning → Container registry: creates registry
- Platform provisioning → AKS cluster: creates cluster
- Platform provisioning → Helm platform charts: installs charts
- GitHub Actions → Build and deploy: triggers workflow (evidence: `README.md`)
- Build and deploy → Python service image: builds image (evidence: `README.md`)
- Build and deploy → Container registry: pushes image (evidence: `README.md`)
- Build and deploy → Kubernetes deployment: deploys application (evidence: `README.md`)
- Kubernetes deployment → AKS cluster: runs on cluster (evidence: `README.md`)
- Operator → Certificate issuers: applies issuers (evidence: `README.md`)
- AKS cluster → NGINX ingress: routes through (evidence: `README.md`)
- AKS cluster → Prometheus monitoring: hosts monitoring (evidence: `README.md`)
- Prometheus monitoring → Grafana dashboards: visualizes metrics (evidence: `README.md`)
