# easzlab/kubeasz architecture

> Architecture diagram of the GitHub repository easzlab/kubeasz, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/easzlab/kubeasz
- Repository: https://github.com/easzlab/kubeasz

## Overview

kubeasz automates installation and lifecycle management of Kubernetes clusters using Ansible and binary-distributed components. The documented setup progresses from prerequisites and certificates through etcd, container runtime, master and node installation, networking, and add-ons; operators can also manage nodes, upgrade, back up, and restore clusters. The graph includes those major capabilities and selected add-on integrations. The README documents the stages, but the sampled source is only a ClickHouse example, so implementation-level orchestration links are not verified.

Main entry points: [`roles`](https://github.com/easzlab/kubeasz/tree/master/roles) (Network plugins), [`ezctl`](https://github.com/easzlab/kubeasz/blob/master/ezctl) (ezctl), [`roles/prepare`](https://github.com/easzlab/kubeasz/tree/master/roles/prepare) (Prerequisites and certificates), [`roles/etcd`](https://github.com/easzlab/kubeasz/tree/master/roles/etcd) (etcd cluster)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_deploy["Cluster deployment"]
  node_ezctl["ezctl"]
  node_prepare["Prerequisites and certificates"]
  node_etcd["etcd cluster"]
  node_runtime["Container runtime"]
  node_master["Kubernetes masters"]
  node_nodes["Kubernetes nodes"]
end

subgraph group_network["Networking"]
  node_networking["Network plugins"]
  node_calico["Calico networking"]
  node_cilium["Cilium networking"]
  node_flannel["Flannel networking"]
  node_other_networks["Other network options"]
end

subgraph group_addons["Cluster add-ons"]
  node_addons["Add-on deployment"]
  node_addon_services["Cluster services"]
end

subgraph group_operations["Cluster operations"]
  node_node_ops["Node and master management"]
  node_upgrade["Cluster upgrade<br/>[93.upgrade.yml]"]
  node_backup_restore["Backup and restore"]
end

node_operator(("Cluster operator"))
node_cluster{{"Kubernetes cluster"}}

node_operator -.->|"starts deployment"| node_ezctl
node_ezctl -.->|"configures"| node_prepare
node_prepare -->|"precedes"| node_etcd
node_etcd -->|"precedes"| node_runtime
node_runtime -->|"precedes"| node_master
node_master -->|"precedes"| node_nodes
node_nodes -->|"precedes"| node_networking
node_networking -->|"precedes"| node_addons
node_calico -.->|"network option"| node_networking
node_cilium -.->|"network option"| node_networking
node_flannel -.->|"network option"| node_networking
node_other_networks -.->|"network options"| node_networking
node_addons -.->|"installs"| node_addon_services
node_operator -->|"manages cluster"| node_node_ops
node_operator -->|"requests upgrade"| node_upgrade
node_operator -->|"requests backup or restore"| node_backup_restore
node_node_ops -.->|"changes membership"| node_cluster
node_upgrade -.->|"updates"| node_cluster
node_backup_restore -.->|"backs up or restores"| node_cluster

click node_ezctl "https://github.com/easzlab/kubeasz/blob/master/ezctl"
click node_prepare "https://github.com/easzlab/kubeasz/tree/master/roles/prepare"
click node_etcd "https://github.com/easzlab/kubeasz/tree/master/roles/etcd"
click node_runtime "https://github.com/easzlab/kubeasz/tree/master/roles/containerd"
click node_master "https://github.com/easzlab/kubeasz/tree/master/roles/kube-master"
click node_nodes "https://github.com/easzlab/kubeasz/tree/master/roles/kube-node"
click node_networking "https://github.com/easzlab/kubeasz/tree/master/roles"
click node_calico "https://github.com/easzlab/kubeasz/tree/master/roles/calico"
click node_cilium "https://github.com/easzlab/kubeasz/tree/master/roles/cilium"
click node_flannel "https://github.com/easzlab/kubeasz/tree/master/roles/flannel"
click node_other_networks "https://github.com/easzlab/kubeasz/tree/master/roles"
click node_addons "https://github.com/easzlab/kubeasz/tree/master/roles/cluster-addon"
click node_addon_services "https://github.com/easzlab/kubeasz/tree/master/roles/cluster-addon"
click node_node_ops "https://github.com/easzlab/kubeasz/tree/master/playbooks"
click node_upgrade "https://github.com/easzlab/kubeasz/blob/master/playbooks/93.upgrade.yml"
click node_backup_restore "https://github.com/easzlab/kubeasz/tree/master/playbooks"

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_ezctl,node_prepare,node_etcd,node_runtime,node_master,node_nodes toneBlue
class node_networking,node_calico,node_cilium,node_flannel,node_other_networks toneAmber
class node_addons,node_addon_services toneMint
class node_node_ops,node_upgrade,node_backup_restore toneRose
class node_operator,node_cluster toneIndigo
```

## Components

### Cluster deployment

- [ezctl](https://github.com/easzlab/kubeasz/blob/master/ezctl): `ezctl`
- [Prerequisites and certificates](https://github.com/easzlab/kubeasz/tree/master/roles/prepare): `roles/prepare`
- [etcd cluster](https://github.com/easzlab/kubeasz/tree/master/roles/etcd): `roles/etcd`
- [Container runtime](https://github.com/easzlab/kubeasz/tree/master/roles/containerd): `roles/containerd`
- [Kubernetes masters](https://github.com/easzlab/kubeasz/tree/master/roles/kube-master): `roles/kube-master`
- [Kubernetes nodes](https://github.com/easzlab/kubeasz/tree/master/roles/kube-node): `roles/kube-node`

### Networking

- [Network plugins](https://github.com/easzlab/kubeasz/tree/master/roles): `roles`
- [Calico networking](https://github.com/easzlab/kubeasz/tree/master/roles/calico): `roles/calico`
- [Cilium networking](https://github.com/easzlab/kubeasz/tree/master/roles/cilium): `roles/cilium`
- [Flannel networking](https://github.com/easzlab/kubeasz/tree/master/roles/flannel): `roles/flannel`
- [Other network options](https://github.com/easzlab/kubeasz/tree/master/roles): `roles`

### Cluster add-ons

- [Add-on deployment](https://github.com/easzlab/kubeasz/tree/master/roles/cluster-addon): `roles/cluster-addon`
- [Cluster services](https://github.com/easzlab/kubeasz/tree/master/roles/cluster-addon): `roles/cluster-addon`

### Cluster operations

- [Node and master management](https://github.com/easzlab/kubeasz/tree/master/playbooks): `playbooks`
- [Cluster upgrade](https://github.com/easzlab/kubeasz/blob/master/playbooks/93.upgrade.yml): `playbooks/93.upgrade.yml`
- [Backup and restore](https://github.com/easzlab/kubeasz/tree/master/playbooks): `playbooks`

### Other components

- **Cluster operator**
- **Kubernetes cluster**

## Connections

- Cluster operator → ezctl: starts deployment
- ezctl → Prerequisites and certificates: configures
- Prerequisites and certificates → etcd cluster: precedes (evidence: `README.md`)
- etcd cluster → Container runtime: precedes (evidence: `README.md`)
- Container runtime → Kubernetes masters: precedes (evidence: `README.md`)
- Kubernetes masters → Kubernetes nodes: precedes (evidence: `README.md`)
- Kubernetes nodes → Network plugins: precedes (evidence: `README.md`)
- Network plugins → Add-on deployment: precedes (evidence: `README.md`)
- Calico networking → Network plugins: network option
- Cilium networking → Network plugins: network option
- Flannel networking → Network plugins: network option
- Other network options → Network plugins: network options
- Add-on deployment → Cluster services: installs
- Cluster operator → Node and master management: manages cluster (evidence: `README.md`)
- Cluster operator → Cluster upgrade: requests upgrade (evidence: `README.md`)
- Cluster operator → Backup and restore: requests backup or restore (evidence: `README.md`)
- Node and master management → Kubernetes cluster: changes membership
- Cluster upgrade → Kubernetes cluster: updates
- Backup and restore → Kubernetes cluster: backs up or restores
