# kubeflow/manifests architecture

> Architecture diagram of the GitHub repository kubeflow/manifests, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kubeflow/manifests
- Repository: https://github.com/kubeflow/manifests

## Overview

##### Project’s Purpose and Type
- It is not a traditional “application codebase” but an extensive set of configuration manifests for a full-scale ML platform deployment.
- The repository’s aim is to install the entire Kubeflow ecosystem (components such as Pipelines, KServe, Notebook Controllers, Central Dashboard, Training Operator, etc.) onto a Kubernetes cluster.
- It uses Kustomize overlays to support multiple environments and integrate with common supporting services (Istio, Dex, cert-manager, oauth2-proxy, knative, etc.).

##### File Structure
- The top-level directories break into key areas:
– “apps”: Contains Kubeflow’s official components (each subfolder represents a separate Kubeflow component/application).
– “common”: Holds shared infrastructure components such as cert-manager, dex (for authentication), istio (for service mesh and ingress), knative, network policies, oauth2-proxy, and others.
– “experimental”: Features third-party integrations (like Ray, SeaweedFS) and experimental deployments.
– Other directories such as “proposals”, “scripts”, and “tests” provide adjunct support.
- This organization highlights an architecture based on multiple independent pieces that are typically deployed into different Kubernetes namespaces; some components (like Istio or Dex) support external authentication and routing across several Kubeflow applications.

##### README for Architectural Insights
- The README explains that users can deploy either the entire platform or individual components, making the system design modular.
- It describes how individual components are maintained separately and then “stitched together” through centralized authentication (using Dex coupled with oauth2-proxy) and networking (using Istio as the ingress gateway).
- The dependency matrix provided (with upstream revisions for each component) emphasizes that every major Kubeflow service (e.g., pipelines, notebook controller, katib, central dashboard) is integrated under a common infrastructure environment.

##### Main Components and Their Relationships
◦ Ingress & Networking: Represent Istio (ingress gateways, virtual services, destination rules) and external connectivity (port-forward, NodePort/LoadBalancer concepts).
◦ Authentication & Identity: Capture Dex (as an OpenID Connect identity provider), oauth2-proxy (to extend Istio’s ingress functionality), and the associated configuration overlays.
◦ Core Kubeflow Applications: These include Pipelines, Notebook Controller, Central Dashboard, Tensorboards Web App, Profiles controller, Training Operator, PVC Viewer, Volumes Web App, and KServe along with its Models Web App.
◦ Shared/common Services: Include cert-manager (for managing TLS certificates), network policies, common roles (kubeflow-view/edit/admin) and namespaces.
◦ Experimental/Third-Party Modules: We can annotate that there are experimental modules (like Ray and SeaweedFS) for advanced experimentation.
- Directional flows:
◦ Traffic enters via the Istio Ingress Gateway.
◦ Authentication flows: The Ingress routes through oauth2-proxy which uses Dex to validate credentials.
◦ Once authenticated, user sessions and API calls are routed to various Kubeflow components (e.g., Pipeline API, Notebook server, Dashboard).
◦ Internal communication is secured by Istio routing rules and mutual TLS established with cert-manager support.

##### Important Architectural Patterns and Connections
- Modular and overlay-based design approach using Kustomize. This is visible in the file tree (several “overlays” directories per service).
- How external dependencies (authentication, identity, network security) are decoupled from individual business components.
- That each component is independently deployable yet integrates with shared common services.

## Diagram (Mermaid)

```mermaid
flowchart TD

    %% External Layer
    subgraph "External Layer"
        User["User Request"]
    end

    %% Ingress & Networking (istio-system)
    subgraph "Ingress & Networking (istio-system)"
        IstioCore["Istio Ingress Gateway"]
        IstioCNI["Istio CNI"]
    end

    %% Authentication & Identity (auth)
    subgraph "Authentication & Identity (auth)"
        OAuth["oauth2-proxy"]
        Dex["Dex"]
    end

    %% Core Kubeflow Applications (kubeflow)
    subgraph "Core Kubeflow Applications (kubeflow)"
        KP["Kubeflow Pipelines"]
        Notebook["Notebook Controller"]
        Dashboard["Central Dashboard"]
        Katib["Katib"]
        KServe["KServe"]
        Models["Models Web App"]
        ModelReg["Model Registry"]
        Profiles["Profiles Controller"]
        PVC["PVC Viewer"]
        Spark["Spark Operator"]
        Training["Training Operator"]
    end

    %% Shared/Common Services
    subgraph "Shared/Common Services"
        Cert["cert-manager"]
        Knative["knative"]
    end

    %% Experimental Modules
    subgraph "Experimental Modules"
        Ray["Experimental Ray Integration"]
        Seaweed["Experimental SeaweedFS"]
    end

    %% Data flows
    User -->|"access"| IstioCore
    IstioCore -->|"routes"| OAuth
    OAuth -->|"validates"| Dex

    %% Post-authentication routing to Core Kubeflow Applications
    Dex -->|"auth_pass"| KP
    Dex -->|"auth_pass"| Notebook
    Dex -->|"auth_pass"| Dashboard
    Dex -->|"auth_pass"| Katib
    Dex -->|"auth_pass"| KServe
    Dex -->|"auth_pass"| Models
    Dex -->|"auth_pass"| ModelReg
    Dex -->|"auth_pass"| Profiles
    Dex -->|"auth_pass"| PVC
    Dex -->|"auth_pass"| Spark
    Dex -->|"auth_pass"| Training

    %% Shared Services support communication security via mTLS
    Cert ---|"mTLS"| KP
    Cert ---|"mTLS"| Notebook
    Cert ---|"mTLS"| Dashboard
    Cert ---|"mTLS"| Katib
    Cert ---|"mTLS"| KServe
    Cert ---|"mTLS"| Models
    Cert ---|"mTLS"| ModelReg
    Cert ---|"mTLS"| Profiles
    Cert ---|"mTLS"| PVC
    Cert ---|"mTLS"| Spark
    Cert ---|"mTLS"| Training

    %% KServe internal relation with Models Web App
    KServe -->|"manages"| Models

    %% Experimental flow from authentication component
    OAuth -->|"routes_expt"| Ray
    OAuth -->|"routes_expt"| Seaweed

    %% Styling classes
    class User external
    class IstioCore,IstioCNI ingress
    class OAuth,Dex auth
    class KP,Notebook,Dashboard,Katib,KServe,Models,ModelReg,Profiles,PVC,Spark,Training app
    class Cert,Knative common
    class Ray,Seaweed experimental

    %% Click Events
    click KP "https://github.com/kubeflow/manifests/tree/master/apps/pipeline/upstream/base/pipeline"
    click Notebook "https://github.com/kubeflow/manifests/tree/master/apps/jupyter/notebook-controller"
    click Dashboard "https://github.com/kubeflow/manifests/tree/master/apps/centraldashboard"
    click Katib "https://github.com/kubeflow/manifests/tree/master/apps/katib"
    click KServe "https://github.com/kubeflow/manifests/tree/master/apps/kserve"
    click Models "https://github.com/kubeflow/manifests/tree/master/apps/kserve/models-web-app"
    click ModelReg "https://github.com/kubeflow/manifests/tree/master/apps/model-registry"
    click Profiles "https://github.com/kubeflow/manifests/tree/master/apps/profiles"
    click PVC "https://github.com/kubeflow/manifests/tree/master/apps/pvcviewer-controller"
    click Spark "https://github.com/kubeflow/manifests/tree/master/apps/spark/spark-operator"
    click Training "https://github.com/kubeflow/manifests/tree/master/apps/training-operator"
    click IstioCore "https://github.com/kubeflow/manifests/tree/master/common/istio-1-24"
    click IstioCNI "https://github.com/kubeflow/manifests/tree/master/common/istio-cni-1-24"
    click Dex "https://github.com/kubeflow/manifests/tree/master/common/dex"
    click OAuth "https://github.com/kubeflow/manifests/tree/master/common/oauth2-proxy"
    click Cert "https://github.com/kubeflow/manifests/tree/master/common/cert-manager"
    click Knative "https://github.com/kubeflow/manifests/tree/master/common/knative"
    click Ray "https://github.com/kubeflow/manifests/tree/master/experimental/ray"
    click Seaweed "https://github.com/kubeflow/manifests/tree/master/experimental/seaweedfs"
```
