# karthikk022/mlops-k8s-platform architecture

> Architecture diagram of the GitHub repository karthikk022/mlops-k8s-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/karthikk022/mlops-k8s-platform
- Repository: https://github.com/karthikk022/mlops-k8s-platform

## Overview

MLOps K8s Platform automates model development and operations on Amazon EKS. The principal workflow generates or supplies data, validates and preprocesses it, trains and evaluates a model, tracks and registers it in MLflow, then serves it through KServe with canary rollout. Separate branches cover Feast feature serving, drift monitoring and observability, infrastructure and security, and disaster recovery. Sampled code confirms pipeline stage calls, model loading, feature materialization, and drift metric export; other links reflect README documentation, not inspected implementation.

Main entry points: [`ml-pipeline/pipeline.py`](https://github.com/karthikk022/mlops-k8s-platform/blob/main/ml-pipeline/pipeline.py) (Pipeline Orchestrator), [`serving/InferenceService.yaml`](https://github.com/karthikk022/mlops-k8s-platform/blob/main/serving/InferenceService.yaml) (KServe Deployment), [`serving/model-server/handler.py`](https://github.com/karthikk022/mlops-k8s-platform/blob/main/serving/model-server/handler.py) (Inference Handler), [`infrastructure/terraform`](https://github.com/karthikk022/mlops-k8s-platform/tree/main/infrastructure/terraform) (EKS Infrastructure)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ml["ML Lifecycle"]
  node_sampledata["Sample Data"]
  node_pipeline["Pipeline Orchestrator<br/>[pipeline.py]"]
  node_validation["Data Validation<br/>[pipeline.py]"]
  node_preprocess["Preprocessing<br/>[preprocess.py]"]
  node_training["Model Training<br/>[train.py]"]
  node_evaluation["Evaluation Gate<br/>[evaluate.py]"]
end

subgraph group_platform["Model Platform"]
  node_registry[("MLflow Registry")]
  node_features["Feature Definitions"]
  node_materialize["Feature Materialization<br/>[materialize.py]"]
  node_serving["Inference Handler<br/>[handler.py]"]
  node_kserve["KServe Deployment"]
  node_canary["Canary Rollout"]
end

subgraph group_ops["Observability"]
  node_drift["Drift Monitor<br/>[drift_monitor.py]"]
  node_prometheus["Prometheus Alerts"]
  node_dashboards["Grafana Dashboards"]
end

subgraph group_infra["Infrastructure"]
  node_eks["EKS Infrastructure"]
  node_security["Admission Policies"]
end

subgraph group_resilience["Security and Recovery"]
  node_velero["Cluster Backups"]
  node_rds[("RDS Snapshots<br/>[rds-snapshots.tf]")]
  node_s3replication[("S3 Replication<br/>[s3-replication.tf]")]
end

node_engineer(("ML Engineer"))
node_aws(("AWS Services"))

node_engineer -->|"generates data"| node_sampledata
node_engineer -->|"runs pipeline"| node_pipeline
node_pipeline -->|"calls validation"| node_validation
node_pipeline -->|"calls preprocessing"| node_preprocess
node_pipeline -->|"calls training"| node_training
node_pipeline -->|"calls evaluation"| node_evaluation
node_training -->|"logs and registers"| node_registry
node_evaluation -->|"loads model"| node_registry
node_registry -->|"supplies model"| node_serving
node_serving -->|"serves inference"| node_kserve
node_kserve -->|"routes rollout"| node_canary
node_features -->|"defines features"| node_materialize
node_materialize -->|"serves online features"| node_kserve
node_serving -.->|"produces predictions"| node_drift
node_drift -->|"exports metrics"| node_prometheus
node_prometheus -->|"visualizes metrics"| node_dashboards
node_eks -->|"hosts serving"| node_kserve
node_security -->|"enforces policies"| node_eks
node_eks -->|"backs up cluster"| node_velero
node_aws -->|"stores snapshots"| node_rds
node_aws -->|"replicates objects"| node_s3replication

click node_sampledata "https://github.com/karthikk022/mlops-k8s-platform/blob/main/data/generate_sample_data.py"
click node_pipeline "https://github.com/karthikk022/mlops-k8s-platform/blob/main/ml-pipeline/pipeline.py"
click node_validation "https://github.com/karthikk022/mlops-k8s-platform/blob/main/ml-pipeline/pipeline.py"
click node_preprocess "https://github.com/karthikk022/mlops-k8s-platform/blob/main/ml-pipeline/preprocessing/preprocess.py"
click node_training "https://github.com/karthikk022/mlops-k8s-platform/blob/main/ml-pipeline/training/train.py"
click node_evaluation "https://github.com/karthikk022/mlops-k8s-platform/blob/main/ml-pipeline/evaluation/evaluate.py"
click node_registry "https://github.com/karthikk022/mlops-k8s-platform/tree/main/infrastructure/helm/mlflow"
click node_features "https://github.com/karthikk022/mlops-k8s-platform/blob/main/feature-store/feature_definitions.py"
click node_materialize "https://github.com/karthikk022/mlops-k8s-platform/blob/main/feature-store/materialize.py"
click node_serving "https://github.com/karthikk022/mlops-k8s-platform/blob/main/serving/model-server/handler.py"
click node_kserve "https://github.com/karthikk022/mlops-k8s-platform/blob/main/serving/InferenceService.yaml"
click node_canary "https://github.com/karthikk022/mlops-k8s-platform/blob/main/serving/canary-rollout.yaml"
click node_drift "https://github.com/karthikk022/mlops-k8s-platform/blob/main/monitoring/evidently/drift_monitor.py"
click node_prometheus "https://github.com/karthikk022/mlops-k8s-platform/tree/main/monitoring/alerts"
click node_dashboards "https://github.com/karthikk022/mlops-k8s-platform/tree/main/monitoring/dashboards"
click node_eks "https://github.com/karthikk022/mlops-k8s-platform/tree/main/infrastructure/terraform"
click node_security "https://github.com/karthikk022/mlops-k8s-platform/tree/main/security/gatekeeper"
click node_velero "https://github.com/karthikk022/mlops-k8s-platform/tree/main/backup-dr/velero"
click node_rds "https://github.com/karthikk022/mlops-k8s-platform/blob/main/backup-dr/terraform/rds-snapshots.tf"
click node_s3replication "https://github.com/karthikk022/mlops-k8s-platform/blob/main/backup-dr/terraform/s3-replication.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_sampledata,node_pipeline,node_validation,node_preprocess,node_training,node_evaluation toneBlue
class node_registry,node_features,node_materialize,node_serving,node_kserve,node_canary toneAmber
class node_drift,node_prometheus,node_dashboards toneMint
class node_eks,node_security toneRose
class node_velero,node_rds,node_s3replication,node_engineer,node_aws toneIndigo
```

## Components

### ML Lifecycle

- [Sample Data](https://github.com/karthikk022/mlops-k8s-platform/blob/main/data/generate_sample_data.py): `data/generate_sample_data.py`
- [Pipeline Orchestrator](https://github.com/karthikk022/mlops-k8s-platform/blob/main/ml-pipeline/pipeline.py): `ml-pipeline/pipeline.py`
- [Data Validation](https://github.com/karthikk022/mlops-k8s-platform/blob/main/ml-pipeline/pipeline.py): `ml-pipeline/pipeline.py`
- [Preprocessing](https://github.com/karthikk022/mlops-k8s-platform/blob/main/ml-pipeline/preprocessing/preprocess.py): `ml-pipeline/preprocessing/preprocess.py`
- [Model Training](https://github.com/karthikk022/mlops-k8s-platform/blob/main/ml-pipeline/training/train.py): `ml-pipeline/training/train.py`
- [Evaluation Gate](https://github.com/karthikk022/mlops-k8s-platform/blob/main/ml-pipeline/evaluation/evaluate.py): `ml-pipeline/evaluation/evaluate.py`

### Model Platform

- [MLflow Registry](https://github.com/karthikk022/mlops-k8s-platform/tree/main/infrastructure/helm/mlflow): `infrastructure/helm/mlflow`
- [Feature Definitions](https://github.com/karthikk022/mlops-k8s-platform/blob/main/feature-store/feature_definitions.py): `feature-store/feature_definitions.py`
- [Feature Materialization](https://github.com/karthikk022/mlops-k8s-platform/blob/main/feature-store/materialize.py): `feature-store/materialize.py`
- [Inference Handler](https://github.com/karthikk022/mlops-k8s-platform/blob/main/serving/model-server/handler.py): `serving/model-server/handler.py`
- [KServe Deployment](https://github.com/karthikk022/mlops-k8s-platform/blob/main/serving/InferenceService.yaml): `serving/InferenceService.yaml`
- [Canary Rollout](https://github.com/karthikk022/mlops-k8s-platform/blob/main/serving/canary-rollout.yaml): `serving/canary-rollout.yaml`

### Observability

- [Drift Monitor](https://github.com/karthikk022/mlops-k8s-platform/blob/main/monitoring/evidently/drift_monitor.py): `monitoring/evidently/drift_monitor.py`
- [Prometheus Alerts](https://github.com/karthikk022/mlops-k8s-platform/tree/main/monitoring/alerts): `monitoring/alerts`
- [Grafana Dashboards](https://github.com/karthikk022/mlops-k8s-platform/tree/main/monitoring/dashboards): `monitoring/dashboards`

### Infrastructure

- [EKS Infrastructure](https://github.com/karthikk022/mlops-k8s-platform/tree/main/infrastructure/terraform): `infrastructure/terraform`
- [Admission Policies](https://github.com/karthikk022/mlops-k8s-platform/tree/main/security/gatekeeper): `security/gatekeeper`

### Security and Recovery

- [Cluster Backups](https://github.com/karthikk022/mlops-k8s-platform/tree/main/backup-dr/velero): `backup-dr/velero`
- [RDS Snapshots](https://github.com/karthikk022/mlops-k8s-platform/blob/main/backup-dr/terraform/rds-snapshots.tf): `backup-dr/terraform/rds-snapshots.tf`
- [S3 Replication](https://github.com/karthikk022/mlops-k8s-platform/blob/main/backup-dr/terraform/s3-replication.tf): `backup-dr/terraform/s3-replication.tf`

### Other components

- **ML Engineer**
- **AWS Services**

## Connections

- ML Engineer → Sample Data: generates data (evidence: `README.md`)
- ML Engineer → Pipeline Orchestrator: runs pipeline (evidence: `README.md`)
- Pipeline Orchestrator → Data Validation: calls validation (evidence: `ml-pipeline/pipeline.py`)
- Pipeline Orchestrator → Preprocessing: calls preprocessing (evidence: `ml-pipeline/pipeline.py`)
- Pipeline Orchestrator → Model Training: calls training (evidence: `ml-pipeline/pipeline.py`)
- Pipeline Orchestrator → Evaluation Gate: calls evaluation (evidence: `ml-pipeline/pipeline.py`)
- Model Training → MLflow Registry: logs and registers (evidence: `ml-pipeline/training/train.py`)
- Evaluation Gate → MLflow Registry: loads model (evidence: `ml-pipeline/evaluation/evaluate.py`)
- MLflow Registry → Inference Handler: supplies model (evidence: `serving/model-server/handler.py`)
- Inference Handler → KServe Deployment: serves inference (evidence: `README.md`)
- KServe Deployment → Canary Rollout: routes rollout (evidence: `README.md`)
- Feature Definitions → Feature Materialization: defines features (evidence: `README.md`)
- Feature Materialization → KServe Deployment: serves online features (evidence: `README.md`)
- Inference Handler → Drift Monitor: produces predictions
- Drift Monitor → Prometheus Alerts: exports metrics (evidence: `monitoring/evidently/drift_monitor.py`)
- Prometheus Alerts → Grafana Dashboards: visualizes metrics (evidence: `README.md`)
- EKS Infrastructure → KServe Deployment: hosts serving (evidence: `README.md`)
- Admission Policies → EKS Infrastructure: enforces policies (evidence: `README.md`)
- EKS Infrastructure → Cluster Backups: backs up cluster (evidence: `README.md`)
- AWS Services → RDS Snapshots: stores snapshots (evidence: `README.md`)
- AWS Services → S3 Replication: replicates objects (evidence: `README.md`)
