Skip to content

Commit 641bcbf

Browse files
author
aloui ikram
committed
docs: improve k3s reference architecture
1 parent 379ec8c commit 641bcbf

1 file changed

Lines changed: 47 additions & 11 deletions

File tree

docs/guides/k3s-reference-architecture.md

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
| 2 | [Reference Architecture](#2-reference-architecture) |
2121
| 3 | [Security Model : SPIFFE/SPIRE Integration](#3-security-model--spiffespire-integration) |
2222
| 4 | [Connectivity Model](#4-connectivity-model) |
23-
| 5 | [Setup Guide : Method 1: Network-Based Registry Mirror](#5-setup-guide) |
24-
| 6 | [Setup Guide : Method 2: Automated Air-Gap via Direct Delivery](#6-setup-guide) |
23+
| 5 | [Setup Guide: Method 1 - Network-Based Registry Mirror](#setup-method-1) |
24+
| 6 | [Setup Guide: Method 2 - Automated Air-Gap via Direct Delivery](#setup-method-2) |
2525
| 7 | [Enterprise Use Cases](#7-enterprise-use-cases) |
2626
| 8 | [Ecosystem Alignment](#8-ecosystem-alignment) |
2727
| 9 | [References & Further Reading](#9-references--further-reading) |
@@ -124,6 +124,21 @@ Distributing static registry credentials (`docker login` tokens) to thousands of
124124
* **Automated Rotation:** SVIDs maintain a strict Time-To-Live (TTL). The SPIRE Workload API seamlessly renews certificates before expiration, eliminating maintenance windows and human intervention.
125125
* **Hardware-Change Protection:** Credentials are encrypted at rest using a device fingerprint derived from the `machine-id`, MAC address, and disk serial number. If an edge device is physically stolen or its storage is cloned, the credentials become unreadable.
126126

127+
### 3.3 SPIRE Attestation Methods for K3s Edge Nodes
128+
129+
Harbor Satellite supports multiple SPIRE node attestation methods:
130+
131+
| Method | Best Fit | Notes |
132+
| --- | --- | --- |
133+
| **join-token** | Fast onboarding, test environments | One-time token flow with minimal prerequisites. |
134+
| **x509pop** | Production PKI environments | Uses pre-provisioned X.509 certs for proof-of-possession attestation. |
135+
| **sshpop** | SSH CA-backed environments | Uses host SSH identity for proof-of-possession attestation. |
136+
137+
### 3.4 Trust Domain Design
138+
139+
- **Single trust domain:** Recommended when cloud and edge are under one platform/security team.
140+
- **Federated trust domains:** Recommended when multiple organizations, regions, or teams need separate trust roots with controlled federation between them.
141+
127142
---
128143

129144
## 4. Connectivity Model
@@ -136,7 +151,7 @@ The Satellite utilizes three concurrent scheduling loops:
136151

137152
| Scheduler | Default Interval | Behavior |
138153
| --- | --- | --- |
139-
| **State Replication** | 10 seconds | Fetches the desired state from Harbor; pulls missing layers; purges stale artifacts. |
154+
| **State Replication** | 10 seconds | Fetches desired state from Ground Control, then pulls missing layers from Harbor and purges stale artifacts. |
140155
| **Telemetry Heartbeat** | 30 seconds | Transmits CPU, memory, disk utilization, and local inventory to Ground Control. |
141156
| **Registration** | 30 seconds (Retry) | Re-authenticates via ZTR to refresh Harbor credentials if required. |
142157

@@ -154,16 +169,20 @@ During a WAN partition, the State Replication and Heartbeat schedulers enter a s
154169

155170
---
156171

157-
## 5. Setup Guide
158-
## Method 1: Network-Based Registry Mirror
172+
<a id="setup-method-1"></a>
173+
174+
## 5. Setup Guide: Method 1 - Network-Based Registry Mirror
159175

160176
This guide provides end-to-end instructions on how to integrate Harbor Satellite with K3s. By the end of this guide, you will have a resilient Edge node capable of deploying container workloads even when completely disconnected from the central cloud registry.
177+
This reference uses the **standalone Satellite deployment** path on K3s nodes (valid scope: `DaemonSet` or standalone).
161178

162179
### Prerequisites
163180

164181
* A Linux machine (Edge Node) with **K3s** installed.
182+
* A reachable **Central Harbor Registry** with at least one test image.
183+
* **Ground Control** deployment for group/config orchestration.
184+
* **SPIRE Server + SPIRE Agents** (Ground Control side and Edge side).
165185
* **Docker** and **Docker Compose** installed.
166-
* Access to deploy a Central Harbor Registry.
167186

168187
---
169188

@@ -218,16 +237,29 @@ sudo systemctl restart k3s
218237
sudo k3s crictl rmi --prune
219238
```
220239

240+
3. **Alternative Mirror Configuration via Satellite Flag (Optional):**
241+
242+
If Satellite is launched directly, you can configure containerd mirror wiring with:
243+
244+
```bash
245+
go run cmd/main.go \
246+
--token "<token>" \
247+
--ground-control-url "https://<GROUND_CONTROL_HOST>:9080" \
248+
--mirrors=containerd:docker.io
249+
```
250+
221251
---
222252

223253
### Step 3: Deploy Ground Control & Satellite (Zero-Touch)
224254

225255
Deploy the Harbor Satellite components. This utilizes SPIFFE/SPIRE for Zero-Touch Registration (ZTR), automatically authenticating the Edge node without manual secrets.
256+
This walkthrough uses the **external SPIRE** quickstart; embedded SPIRE is an alternative deployment model.
257+
The setup scripts start the required SPIRE agents (including the edge-side agent on the K3s node).
226258

227259
1. **Start Ground Control:**
228260

229261
```bash
230-
cd harbor-satellite/deploy/quickstart/spiffe/join-token/external/gc
262+
cd deploy/quickstart/spiffe/join-token/external/gc
231263
HARBOR_URL=http://<CENTRAL_HARBOR_IP>:80 ./setup.sh
232264
```
233265

@@ -325,8 +357,9 @@ docker logs satellite | grep "nginx/blobs"
325357

326358
---
327359

328-
## 6. Setup Guide
329-
## Method 2: Automated Air-Gap via Direct Delivery
360+
<a id="setup-method-2"></a>
361+
362+
## 6. Setup Guide: Method 2 - Automated Air-Gap via Direct Delivery
330363

331364
This guide documents the automated **Direct Delivery** workflow for integrating Harbor Satellite with K3s. Instead of manually running `docker pull`, `docker tag`, and `docker save`, Satellite writes image tarballs directly into the K3s import directory, where `containerd` loads them automatically.
332365

@@ -370,7 +403,7 @@ services:
370403
Restart Satellite after editing:
371404
372405
```bash
373-
cd harbor-satellite/deploy/quickstart/spiffe/join-token/external/sat
406+
cd deploy/quickstart/spiffe/join-token/external/sat
374407
docker compose up -d satellite --build
375408

376409
# Optional: confirm Direct Delivery is active
@@ -480,8 +513,10 @@ Harbor Satellite serves as a critical **registry layer** within the broader SUSE
480513
| Component | Integration Value |
481514
| --- | --- |
482515
| **K3s** | Native integration via `registries.yaml` or auto-import; requires zero external CRDs or operators. |
483-
| **SLE Micro** | Harbor Satellite executes seamlessly atop immutable, read-only operating systems. |
516+
| **SUSE Edge 3.x Stack (SLE Micro + K3s + Rancher)** | Satellite serves as the local registry layer while the SUSE stack handles OS, orchestration, and lifecycle. |
484517
| **Rancher Fleet** | While Fleet synchronizes GitOps YAML manifests, Satellite guarantees the binary image blobs are physically present at the edge site before execution. |
518+
| **ATIP (Adaptive Telecom Infrastructure Platform)** | Complements telecom edge platforms with local image availability under constrained WAN links. |
519+
| **Akri** | Works with edge device discovery workflows by ensuring discovered workloads have local image availability. |
485520
| **Elemental** | Node provisioning automatically registers the Harbor Satellite via ZTR, providing end-to-end zero-touch edge bootstrapping. |
486521
| **SPIFFE/SPIRE** | Replaces all rigid credential arrays with ephemeral cryptographic machine identities. |
487522

@@ -506,5 +541,6 @@ To explore the underlying technologies and concepts discussed in this reference
506541
### Security & Identity (Zero-Trust)
507542

508543
* **[SPIFFE & SPIRE Architecture](https://spiffe.io/docs/latest/spire-about/)** : *Foundational reading on how SPIFFE cryptographic identities and SPIRE workload attestation replace static secrets at scale.*
544+
* **[Harbor Satellite SPIFFE Quickstarts](https://github.com/container-registry/harbor-satellite/tree/main/deploy/quickstart/spiffe)** : *Join token, x509pop, and sshpop setup variants for practical deployment paths.*
509545

510546
---

0 commit comments

Comments
 (0)