@@ -47,6 +47,23 @@ tooling such as kubectl and client-go.
4747 We're working with the upstream community on adding support for the multi-cluster setups to the Kubernetes
4848 controller-runtime.
4949
50+ ``` mermaid
51+ graph TB
52+ subgraph KCP_Server ["KCP Server"]
53+ KS[Kubernetes API Server<br/>Core Components]
54+ KCP_Extensions[KCP Extensions<br/>APIBinding, Workspace,<br/>WorkspaceType, Partition, etc...]
55+ end
56+
57+ KS --> KCP_Extensions
58+ KCP_Extensions --> KS
59+
60+ User1[User/Team A] --> KCP_Server
61+ User2[User/Team B] --> KCP_Server
62+ Kubectl[kubectl] --> KCP_Server
63+ Client[Kubernetes Client] --> KCP_Server
64+
65+ ```
66+
5067## Logical Cluster
5168
5269A logical cluster is a way to subdivide a kcp server and its ` etcd ` datastore into multiple clusters without requiring
@@ -85,9 +102,37 @@ such as Workspace, to create logical cluster.
85102 unless stated otherwise, what applies to a workspace applies to a logical cluster as well, because Workspaces are
86103 abstractions built on top of logical clusters.
87104
105+ ``` mermaid
106+ graph TB
107+ subgraph KCP_Server ["KCP Server"]
108+ subgraph WorkspaceLayer [Workspace Layer]
109+ WS1[Workspace: bobs<br/>Type: organization<br/>Phase: Ready]
110+ WS2[Workspace: alice<br/>Type: universal<br/>Phase: Ready]
111+ end
112+
113+ subgraph LogicalClusterLayer [Logical Cluster Layer - Auto-created]
114+ LC1[Logical Cluster<br/>:root:bobs]
115+ LC2[Logical Cluster<br/>:root:alice]
116+ end
117+
118+ subgraph StorageLayer [Storage Layer]
119+ ETCD[(etcd<br/>Single Storage Cluster)]
120+ end
121+ end
122+
123+ WS1 -->|auto-creates| LC1
124+ WS2 -->|auto-creates| LC2
125+
126+ LC1 -->|stores data in<br/>/bobs/ prefix| ETCD
127+ LC2 -->|stores data in<br/>/alice/ prefix| ETCD
128+
129+ User1[User: Bob] -->|kubectl ws use :root:bobs| LC1
130+ User2[User: Alice] -->|kubectl ws use :root:alice| LC2
131+ ```
132+
88133## Workspace
89134
90- A Workspace is an abstraction used to create and provision logical clusters. Aside from creating the LogicalCluster
135+ A Workspace is an abstraction used to create and provision logical clusters. Aside from creating the ` LogicalCluster `
91136object, the responsibility of a Workspace is to initialize the given logical cluster by installing the required
92137resources for the given workspace type, creating the initial objects, and more.
93138
@@ -108,6 +153,22 @@ A Workspace's path is based on the hierarchy and the user provided name. For exa
108153The workspace path is used for building the workspace URL and for accessing the workspace via the ` ws ` kubectl plugin.
109154
110155More information, including examples, can be found in the the [ Workspaces document] ( workspaces/index.md ) .
156+ ``` mermaid
157+ graph TB
158+ Root[Root Workspace<br/>root:]
159+
160+ Root --> Corp1[Acme Corp<br/>root:acme-corp]
161+ Root --> Corp2[Startup XYZ<br/>root:startup-xyz]
162+
163+ Corp1 --> Eng[Engineering<br/>root:acme-corp:engineering]
164+ Corp1 --> Mkt[Marketing<br/>root:acme-corp:marketing]
165+
166+ Eng --> Team1[App Team 1<br/>root:acme-corp:engineering:app-team-1]
167+ Eng --> Team2[App Team 2<br/>root:acme-corp:engineering:app-team-2]
168+ Eng --> Platform[Platform<br/>root:acme-corp:engineering:platform]
169+
170+ Corp2 --> Dev[Development<br/>root:startup-xyz:dev]
171+ ```
111172
112173### Workspace Types
113174
@@ -122,6 +183,26 @@ By default, each workspace has the [built-in APIs installed and available to its
122183
123184More information, including a list of Workspace Types and examples, can be found in the
124185[ Workspace Types document] ( workspaces/workspace-types.md ) .
186+ ``` mermaid
187+ graph TB
188+ Title[Workspace Types = Pre-configured Environments]
189+
190+ subgraph WorkspaceTypes
191+ AppType[App Workspace Type<br/>Has: DaaS]
192+ FunctionType[Function Workspace Type<br/>Has: Knative Functions]
193+ ManagementType[Management Type<br/>Has: User Management]
194+ end
195+
196+ Title --> WorkspaceTypes
197+
198+ WorkspaceTypes -->|creates| Team1[App Team Workspace<br/>Can deploy apps]
199+ WorkspaceTypes -->|creates| Team2[Functions Team Workspace<br/>Can create functions]
200+ WorkspaceTypes -->|creates| Team3[Admin Workspace<br/>Can manage users]
201+
202+ Team1 --> Dev1[App Developer<br/>Sees app tools only]
203+ Team2 --> Dev2[Function Developer<br/>Sees function tools only]
204+ Team3 --> Admin1[Administrator<br/>Sees admin tools only]
205+ ```
125206
126207## Virtual Workspaces
127208
@@ -187,6 +268,38 @@ The general workflow is:
187268- Users can now create API resources of those types in their workspace. You can build and run controllers that are
188269 going to reconcile those resources across different workspaces.
189270
271+ ``` mermaid
272+ graph TB
273+ Title[API Exporting/Binding = Sharing Tools Between Workspaces/Logical Clusters]
274+
275+ subgraph ToolOwner [Infra: Has Unique Tools]
276+ Infra[Infra Workspace]
277+ SpecialTool[Special Database API <br/>PostgreSQL Operator]
278+ APIExport[API Export <br/> I'm sharing my Database tool]
279+ end
280+
281+ subgraph ToolUsers [App Teams - Need Tools]
282+ AppTeam1[App Team 1 Workspace]
283+ AppTeam2[App Team 2 Workspace]
284+ APIBinding1[API Binding <br/> I want to use Database tool]
285+ APIBinding2[API Binding <br/> I want to use Database tool]
286+ end
287+
288+ Title --> ToolOwner
289+
290+ Infra --> SpecialTool
291+ SpecialTool --> APIExport
292+
293+ APIExport -->|shares with| APIBinding1
294+ APIExport -->|shares with| APIBinding2
295+
296+ APIBinding1 --> AppTeam1
297+ APIBinding2 --> AppTeam2
298+
299+ AppTeam1 --> CanUse1[App Team 1: <br/>can now create PostgreSQL databases]
300+ AppTeam2 --> CanUse2[App Team 2: <br/>can now create PostgreSQL databases]
301+ ```
302+
190303## Shard
191304
192305A failure domain within the larger control plane service that cuts across the primary functionality. Most distributed
@@ -218,3 +331,16 @@ available shards.
218331
219332!!! note
220333 Depending on how you setup kcp, you might have front proxy running even though you don't have a sharded setup.
334+
335+ ``` mermaid
336+ graph TB
337+ Users[All Users & kubectl] --> FrontProxy[kcp-front-proxy<br/>Smart Router]
338+
339+ FrontProxy --> Shard1[Shard 1<br/>Workspaces: frontend-team, mobile-team]
340+ FrontProxy --> Shard2[Shard 2<br/>Workspaces: backend-team, data-team]
341+ FrontProxy --> Shard3[Shard 3<br/>Workspaces: platform-team, infra-team]
342+
343+ Shard1 --> etcd1[etcd Storage<br/>Frontend & Mobile data]
344+ Shard2 --> etcd2[etcd Storage<br/>Backend & Data team data]
345+ Shard3 --> etcd3[etcd Storage<br/>Platform & Infra data]
346+ ```
0 commit comments