33 lines
1.4 KiB
Markdown
33 lines
1.4 KiB
Markdown
---
|
||
title: "K3s"
|
||
type: entity
|
||
tags: [kubernetes, container, orchestration, open-source]
|
||
sources: [self-healing-home-server]
|
||
last_updated: 2026-04-22
|
||
---
|
||
|
||
## Aliases
|
||
- K3s
|
||
- k3s
|
||
|
||
## Definition
|
||
K3s 是一个轻量级的 Kubernetes 发行版,由 Rancher Labs(现 SUSE)开发,专为边缘计算、资源受限环境和家庭实验室设计。相较于标准 Kubernetes,K3s 将所有控制平面组件打包为单一二进制文件,去除了 cloud provider 特化代码,默认使用 SQLite 作为存储后端,体积仅约 50MB。
|
||
|
||
## Core Features
|
||
- **单二进制部署**:所有 K8s 组件打包为单一可执行文件
|
||
- **轻量资源占用**:最低 512MB RAM 即可运行,适合树莓派和家庭服务器
|
||
- **内置容器运行时**:默认使用 containerd,无需 Docker 依赖
|
||
- **简化运维**:自动处理 TLS、滚动更新、指标收集
|
||
|
||
## In Home Lab Context
|
||
在 [[self-healing-home-server]] 使用场景中,K3s 作为家庭 Kubernetes 集群,由 OpenClaw Agent "Reef" 通过 kubectl 管理。Agent 可自动化执行以下操作:
|
||
- Pod 重启与健康检查
|
||
- 资源扩缩容
|
||
- 配置变更与 Rollback
|
||
- 跨节点工作负载调度
|
||
|
||
## Connections
|
||
- [[OpenClaw]] — 通过 kubectl 管理 K3s 集群的 Agent 平台
|
||
- [[Self-Healing-Systems]] — K3s 提供 Liveness/Readiness Probes 原生自愈能力
|
||
- [[Infrastructure-as-Code]] — Agent 编写并应用 Kubernetes manifests
|