Skip to content

Commit a9f3009

Browse files
Merge pull request #668 from nebari-dev/docs/nkp-architecture-explainer
docs(explanations): add NKP architecture explainer page
2 parents 77a3aa0 + 9bcb696 commit a9f3009

14 files changed

Lines changed: 442 additions & 2985 deletions

docs/docs/explanations/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# Explanations
22

3-
Coming soon.
3+
Background on how Nebari works under the hood. Read these to understand the design and how the pieces fit together.
4+
5+
- [NKP architecture](/docs/explanations/nkp-architecture): the layered stack
6+
that makes up the Nebari Kubernetes Platform, what the `nic` CLI does and
7+
doesn't do, and how applications reach the cluster via GitOps.
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
title: NKP architecture
3+
id: nkp-architecture
4+
description: A conceptual tour of how Nebari Kubernetes Platform is layered, what the nic CLI does and doesn't do, and how applications reach the cluster via GitOps.
5+
---
6+
7+
# NKP architecture
8+
9+
Nebari Kubernetes Platform (NKP) is how end users get to AI capabilities like chat assistants, document analyzers, and code review tools, without their team having to assemble a platform first.
10+
11+
Developers package each capability as a **Software Pack**. NKP wires in login, routing, TLS, and observability, so users just open the landing page and click in.
12+
13+
Software Packs come from two places:
14+
15+
- **Official packs** maintained by OpenTeams.
16+
- **Community packs** built and maintained by anyone outside OpenTeams: open-source contributors, businesses building on Nebari, or your own internal team.
17+
18+
## How the layers fit together
19+
20+
NKP is a stack of layers, each doing one job. Because the layers connect through stable, well-defined interfaces, you can change one layer without rewriting the others.
21+
22+
{/* Diagram source: docs/static/img/explanations/_sources/nkp-architecture.html
23+
(open in a browser to view, or import the JSX into Paper / any React renderer to edit) */}
24+
25+
![NKP architecture: layered diagram with Cloud and Kubernetes containers wrapping the Landing page, Software Pack, Nebari Operator, and Foundational software components. A user browses the Landing page; a developer builds the Software Pack. Upward arrows show that the Software Pack is shown on the Landing page, the Nebari Operator deploys the Software Pack, and the Foundational software powers the Nebari Operator.](/img/explanations/nkp-architecture.png)
26+
27+
**Used by end users**
28+
29+
- **Capabilities**: the AI features end users actually rely on (chat assistants, document analyzers, code review tools, and so on).
30+
- **Landing page**: the home page where users sign in and open each installed Capability.
31+
32+
**Built by developers**
33+
34+
- **Software Pack**: an installable Capability (chat assistant, document analyzer, code review tool, and so on).
35+
36+
**Managed by platform engineers**
37+
38+
- **Nebari Operator**: the automation that deploys each Software Pack and connects it to the Foundational software.
39+
- **Foundational software**: shared services (secure connections, login, traffic routing, monitoring, continuous delivery from Git) that power the operator and every running pack.
40+
41+
**Where it all runs**
42+
43+
- **Managed Kubernetes cluster**: hosts every container above. EKS for AWS, K3s for Hetzner and local development.
44+
- **Cloud or bare-metal provider**: the physical infrastructure underneath. AWS, Hetzner, or your own machine for development.
45+
46+
<details>
47+
<summary>**What's in the foundational layer**</summary>
48+
49+
- **cert-manager**: keeps secure connections working. Automatically requests, renews, and rotates HTTPS certificates for every domain in the cluster.
50+
- **Envoy Gateway**: handles traffic routing. Inspects incoming requests and forwards each one to the right service, with built-in rate limiting and authentication checks.
51+
- **Keycloak**: handles login. One sign-on covers every app on the platform (ArgoCD, Grafana, Software Packs), with support for multi-factor authentication and connection to an existing identity provider like Active Directory.
52+
- **OpenTelemetry Collector**: collects logs, metrics, and traces from every running pack so they can be forwarded to an observability backend.
53+
54+
</details>
55+
56+
## The `nic` CLI
57+
58+
The `nic` CLI (short for **Nebari Infrastructure Core**) is the command-line tool for installing, updating, and tearing down NKP's cloud infrastructure.
59+
60+
### What `nic` does
61+
62+
- **Creates the cloud infrastructure.** This includes the network, the managed Kubernetes cluster and its worker machines, the identity and access controls, and the persistent storage.
63+
- **Prepares the cluster.** Sets up the basic Kubernetes structures the platform relies on: organizational groupings (namespaces), permission rules (RBAC), storage templates (storage classes), and network rules (network policies).
64+
- **Installs ArgoCD.** ArgoCD is the GitOps engine that delivers everything above the cluster (the foundational software, the operator, and the packs). `nic` installs it directly so the rest of the platform can flow in from a Git repository.
65+
66+
### What `nic` does not do
67+
68+
- **`nic` is not an application manager.** It does not install or upgrade Software Packs, the Nebari Operator, or any of the foundational software beyond ArgoCD. Those are all delivered from Git through ArgoCD.
69+
- **`nic` does not change the cluster directly after install.** Anything that needs to happen inside a running cluster (a new pack, an updated config) goes through Git first, and ArgoCD applies it.
70+
71+
This split keeps cluster work (the bottom of the stack) and pack work (the top) from blocking each other. Updating the cluster's underlying machines doesn't affect the running packs, and rolling out a new pack version doesn't require a `nic` deploy.
72+
73+
{/* Diagram source: docs/static/img/explanations/_sources/nkp-architecture-split.html
74+
(open in a browser to view, or import the HTML into Paper via the write_html MCP tool) */}
75+
![NKP architecture annotated to show the split between pack work (Landing page and Software Pack, shipped via Git) and cluster work (Nebari Operator and Foundational software, provisioned by the nic CLI). The two halves can change independently.](/img/explanations/nkp-architecture-split.png)
76+
77+
## GitOps via ArgoCD
78+
79+
[ArgoCD](https://github.com/argoproj/argo-cd) is an open-source deployment tool for Kubernetes. It installs and updates every foundational component on the cluster from two kinds of sources:
80+
81+
- **OpenTeams Git repositories:** for OpenTeams-built pieces like the [landing page](https://github.com/nebari-dev/nebari-landing) and the [Nebari Operator](https://github.com/nebari-dev/nebari-operator).
82+
- **Upstream Helm charts:** for external open-source pieces like [Keycloak](https://github.com/keycloak/keycloak), [cert-manager](https://github.com/cert-manager/cert-manager), [Envoy Gateway](https://github.com/envoyproxy/gateway), and the [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector).
83+
84+
A few properties follow from this:
85+
86+
- **No hidden changes:** Every piece of software in the cluster is there because ArgoCD pulled it from a known source. Nothing runs that you can't trace back to a repository or a Helm chart.
87+
- **Self-healing:** If a user manually deletes or changes something in the cluster, ArgoCD detects the difference and restores it from the source.
88+
- **Audit trail and easy rollback:** Every platform change is captured in Git, so you can see who changed what and when, and undoing a change is a single `git revert`.
89+
- **Independent updates:** Each Software Pack moves on its own cadence. Updating one pack doesn't require coordinating with the others, and removing one leaves the rest untouched.
90+
91+
## State and locking
92+
93+
For providers that use OpenTofu under the hood (AWS today), `nic` keeps a state record of everything it builds. This record gives `nic` two abilities on those providers:
94+
95+
- **Locking:** If two engineers run `nic deploy` at the same time, the second one waits until the first one finishes, so they can't make conflicting changes.
96+
97+
```mermaid
98+
sequenceDiagram
99+
participant E1 as Engineer 1
100+
participant SF as State file
101+
participant E2 as Engineer 2
102+
E1->>SF: nic deploy (acquires lock)
103+
Note over E1,SF: Lock held by Engineer 1
104+
E2->>SF: nic deploy (lock busy, waits)
105+
E1->>SF: changes applied, releases lock
106+
SF-->>E2: lock available
107+
E2->>SF: acquires lock, applies changes
108+
```
109+
110+
- **Catches manual changes:** When someone makes a manual change in the cloud (resizing a node group in the console, editing an IAM policy by hand), running `nic deploy --dry-run` shows the difference, and `nic deploy` applies the correction.
111+
112+
Providers that don't use OpenTofu (Hetzner today) take a different provisioning path and don't rely on this state file.
113+
114+
## Where to go next
115+
116+
- [Get started with NKP](/docs/nkp/get-started): install the platform and run your first cluster.
117+
- [Browse Software Packs](/docs/software-packs/): see what Capabilities are available out of the box.

docs/docs/introduction.mdx

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
description: An overview of Nebari, its key features and components.
33
---
44

5-
import ThemedImage from '@theme/ThemedImage';
6-
import useBaseUrl from '@docusaurus/useBaseUrl';
75
import DocCardList from '@theme/DocCardList';
86

97
# Introduction
@@ -33,24 +31,21 @@ Nebari combines both: ready-made building blocks to design your platform, with t
3331

3432
## How Nebari works
3533

36-
Nebari has three parts connected through a central registry: **Software Packs** publish **Capabilities** to the registry, and **Deploy Targets** pull from it to run them.
34+
Nebari has two parts that work together:
3735

38-
{/* To edit this diagram, open the matching .excalidraw file (same folder) at excalidraw.com, then re-export each variant as SVG. */}
39-
<ThemedImage
40-
alt="The Nebari ecosystem: Software Packs push to the central registry; Capabilities pull onto Deploy Targets."
41-
sources={{
42-
light: useBaseUrl('/img/welcome/ecosystem-diagram-light.svg'),
43-
dark: useBaseUrl('/img/welcome/ecosystem-diagram-dark.svg'),
44-
}}
45-
/>
36+
- **Software Packs** package **Capabilities** and publish them on GitHub.
37+
- **Deploy Targets** install those packs onto your infrastructure and run them.
38+
39+
{/* Diagram source: docs/static/img/welcome/_sources/ecosystem-diagram.html
40+
(open in a browser to view, or import the HTML into Paper via the write_html MCP tool) */}
41+
![The Nebari ecosystem: Software Packs publish Capabilities on GitHub; Deploy Targets install them onto your infrastructure.](/img/welcome/ecosystem-diagram.png)
4642

4743
### Software Packs
4844

49-
A **Software Pack** is an installable artifact published to the central registry. Each pack is self-contained, so teams can browse the registry and install only the ones they need. Packs come from three channels:
45+
A **Software Pack** is an installable artifact published to a GitHub repository. Each pack is self-contained, so teams can browse what's available and install only the ones they need. Packs come from two channels:
5046

51-
- **Official packs** by OpenTeams: enterprise-grade, curated, and reviewed before landing in the central registry.
52-
- **Internal packs** by customer teams: private to the authoring organization, not published publicly.
53-
- **Community packs** by open-source contributors: self-published to a separate community listing, not the central registry.
47+
- **Official packs** by OpenTeams: enterprise-grade and curated, published under the [`nebari-dev`](https://github.com/nebari-dev) GitHub organization.
48+
- **Community packs** by open-source contributors: published on GitHub by individual maintainers or by businesses building on Nebari.
5449

5550
### Capabilities
5651

docs/sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = {
3232
label: "Explanations",
3333
link: { type: "doc", id: "explanations/index" },
3434
items: [
35-
// Add explanation docs here
35+
"explanations/nkp-architecture",
3636
],
3737
},
3838
{
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>NKP Architecture — Pack vs Cluster Work — Source</title>
6+
<meta name="description" content="Editable source for the NKP pack-work / cluster-work split diagram, rendered at /img/explanations/nkp-architecture-split.png. Plain HTML with inline styles, openable in any browser, re-importable into Paper via the write_html MCP tool.">
7+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap" rel="stylesheet">
8+
<style>
9+
body { margin: 0; padding: 24px; background: #f5f5f5; font-family: Poppins, system-ui, sans-serif; display: flex; justify-content: center; }
10+
.artboard { box-shadow: 0 4px 24px rgba(0,0,0,0.08); }
11+
</style>
12+
</head>
13+
<body>
14+
<div class="artboard" style="background-color: #FFFFFF; box-sizing: border-box; display: flex; flex-direction: column; gap: 24px; padding: 64px 80px 56px; width: 960px; font-family: 'Poppins', system-ui, sans-serif;">
15+
16+
<!-- Cloud container -->
17+
<div style="background-color: #FEF6E0; border: 1.5px solid #B45309; border-radius: 18px; display: flex; flex-direction: column; gap: 18px; padding: 24px;">
18+
19+
<div style="align-items: baseline; display: flex; gap: 16px; justify-content: space-between; padding: 0 4px;">
20+
<div style="color: #000000; font-size: 18px; font-weight: 700; letter-spacing: 0.08em; line-height: 22px; text-transform: uppercase;">Cloud or bare-metal provider</div>
21+
<div style="color: #000000; font-size: 16px; line-height: 20px;">AWS · GCP · Azure · Hetzner · ...</div>
22+
</div>
23+
24+
<!-- K8s container -->
25+
<div style="background-color: #FFFBEB; border: 1.5px dashed #92400E; border-radius: 14px; display: flex; flex-direction: column; gap: 16px; padding: 20px 24px;">
26+
27+
<div style="align-items: baseline; display: flex; gap: 16px; justify-content: space-between;">
28+
<div style="color: #000000; font-size: 18px; font-weight: 700; letter-spacing: 0.08em; line-height: 22px; text-transform: uppercase;">Managed Kubernetes cluster</div>
29+
<div style="color: #000000; font-size: 16px; line-height: 20px;">EKS · GKE · AKS · K3s</div>
30+
</div>
31+
32+
<!-- PACK WORK banner -->
33+
<div style="align-items: center; display: flex; gap: 12px; padding: 4px 0;">
34+
<div style="background-color: #0F766E; border-radius: 999px; flex: 1; height: 1.5px; opacity: 0.5;"></div>
35+
<div style="align-items: center; display: flex; flex-direction: column; gap: 2px;">
36+
<div style="color: #0F766E; font-size: 14px; font-weight: 700; letter-spacing: 0.12em; line-height: 18px; text-transform: uppercase;">Pack work</div>
37+
<div style="color: #475569; font-size: 14px; line-height: 18px;">shipped via Git</div>
38+
</div>
39+
<div style="background-color: #0F766E; border-radius: 999px; flex: 1; height: 1.5px; opacity: 0.5;"></div>
40+
</div>
41+
42+
<!-- Landing page -->
43+
<div style="align-items: center; display: flex; justify-content: center; padding-top: 8px;">
44+
<div style="align-items: center; background-color: #ECFDF7; border: 1.5px solid #0F766E; border-radius: 12px; display: flex; flex-direction: column; gap: 4px; min-width: 280px; padding: 16px 28px; width: 304px;">
45+
<div style="color: #0F1015; font-size: 22px; font-weight: 700; line-height: 28px;">Landing page</div>
46+
<div style="color: #475569; font-size: 16px; line-height: 20px;">page for installed Capabilities</div>
47+
</div>
48+
</div>
49+
50+
<!-- shown on arrow -->
51+
<div style="display: flex; justify-content: center; position: relative;">
52+
<svg width="20" height="32" viewBox="0 0 20 32" fill="none" xmlns="http://www.w3.org/2000/svg">
53+
<path d="M10 30 L10 6 M4 12 L10 6 L16 12" stroke="#0F1015" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
54+
</svg>
55+
<div style="color: #475569; font-size: 16px; left: calc(50% + 24px); line-height: 20px; position: absolute; top: 50%; transform: translateY(-50%);">shown on</div>
56+
</div>
57+
58+
<!-- Software Pack -->
59+
<div style="align-items: center; display: flex; justify-content: center;">
60+
<div style="align-items: center; background-color: #ECFDF7; border: 1.5px solid #0F766E; border-radius: 12px; display: flex; flex-direction: column; gap: 4px; min-width: 280px; padding: 16px 28px;">
61+
<div style="color: #0F1015; font-size: 22px; font-weight: 700; line-height: 28px;">Software Pack</div>
62+
<div style="color: #475569; font-size: 16px; line-height: 20px;">e.g. chat assistant, code review</div>
63+
</div>
64+
</div>
65+
66+
<!-- deploys arrow (boundary crossing) -->
67+
<div style="align-items: center; display: flex; justify-content: center; position: relative;">
68+
<svg width="20" height="32" viewBox="0 0 20 32" fill="none" xmlns="http://www.w3.org/2000/svg">
69+
<path d="M10 30 L10 6 M4 12 L10 6 L16 12" stroke="#0F1015" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
70+
</svg>
71+
<div style="color: #475569; font-size: 16px; left: calc(50% + 24px); line-height: 20px; position: absolute; top: 50%; transform: translateY(-50%);">deploys</div>
72+
</div>
73+
74+
<!-- CLUSTER WORK banner -->
75+
<div style="align-items: center; display: flex; gap: 12px; padding: 4px 0;">
76+
<div style="background-color: #CB39EC; border-radius: 999px; flex: 1; height: 1.5px; opacity: 0.5;"></div>
77+
<div style="align-items: center; display: flex; flex-direction: column; gap: 2px;">
78+
<div style="color: #CB39EC; font-size: 14px; font-weight: 700; letter-spacing: 0.12em; line-height: 18px; text-transform: uppercase;">Cluster work</div>
79+
<div style="color: #475569; font-size: 14px; line-height: 18px;">provisioned by nic CLI</div>
80+
</div>
81+
<div style="background-color: #CB39EC; border-radius: 999px; flex: 1; height: 1.5px; opacity: 0.5;"></div>
82+
</div>
83+
84+
<!-- Nebari Operator -->
85+
<div style="display: flex; justify-content: center;">
86+
<div style="align-items: center; background-color: #FAF5FF; border: 1.5px solid #CB39EC; border-radius: 12px; display: flex; flex-direction: column; gap: 4px; min-width: 280px; padding: 16px 28px;">
87+
<div style="color: #0F1015; font-size: 22px; font-weight: 700; line-height: 28px;">Nebari Operator</div>
88+
<div style="color: #475569; font-size: 16px; line-height: 20px;">automation that runs in the cluster</div>
89+
</div>
90+
</div>
91+
92+
<!-- powers arrow -->
93+
<div style="align-items: center; display: flex; justify-content: center; position: relative;">
94+
<svg width="20" height="36" viewBox="0 0 20 36" fill="none" xmlns="http://www.w3.org/2000/svg">
95+
<path d="M10 34 L10 6 M4 12 L10 6 L16 12" stroke="#0F1015" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
96+
</svg>
97+
<div style="color: #475569; font-size: 16px; left: calc(50% + 24px); line-height: 20px; position: absolute; top: 50%; transform: translateY(-50%);">powers</div>
98+
</div>
99+
100+
<!-- Foundational software -->
101+
<div style="align-items: center; background-color: #FAF5FF; border: 1.5px solid #CB39EC; border-radius: 12px; display: flex; flex-direction: column; gap: 8px; padding: 20px 32px;">
102+
<div style="color: #0F1015; font-size: 22px; font-weight: 700; line-height: 28px;">Foundational software</div>
103+
<div style="align-items: center; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;">
104+
<div style="color: #475569; font-size: 16px; line-height: 20px;">secure connections</div>
105+
<div style="background-color: #94A3B8; border-radius: 50%; height: 4px; width: 4px;"></div>
106+
<div style="color: #475569; font-size: 16px; line-height: 20px;">login</div>
107+
<div style="background-color: #94A3B8; border-radius: 50%; height: 4px; width: 4px;"></div>
108+
<div style="color: #475569; font-size: 16px; line-height: 20px;">traffic routing</div>
109+
<div style="background-color: #94A3B8; border-radius: 50%; height: 4px; width: 4px;"></div>
110+
<div style="color: #475569; font-size: 16px; line-height: 20px;">monitoring</div>
111+
<div style="background-color: #94A3B8; border-radius: 50%; height: 4px; width: 4px;"></div>
112+
<div style="color: #475569; font-size: 16px; line-height: 20px;">continuous delivery</div>
113+
</div>
114+
</div>
115+
116+
</div>
117+
</div>
118+
</div>
119+
</body>
120+
</html>

0 commit comments

Comments
 (0)