下载源码
拿到 SPIRE 源码与实战脚本,本地对照阅读、直接复现。
SPIRE 官方源码与发布版
| 资源 | 链接 |
|---|---|
| SPIRE 源码(GitHub) | https://github.com/spiffe/spire |
| 浅克隆命令 | git clone --depth 1 https://github.com/spiffe/spire |
| 官方发布版二进制 | https://github.com/spiffe/spire/releases |
| SPIFFE 规范仓库 | https://github.com/spiffe/spiffe |
| go-spiffe 客户端库 | https://github.com/spiffe/go-spiffe |
实战脚本与配置包
| 资料 | 内容 | 下载 |
|---|---|---|
| 实战脚本与配置 | 三节点 lab 的 server.conf / agent.conf / K3S DaemonSet / demo 脚本(已去除凭据样本) | ⬇ spire-lab-scripts.zip |
在线看这套脚本怎么用:三节点部署与复现。
快速上手命令
bash
# 拉取 SPIRE 源码(浅克隆)
git clone --depth 1 https://github.com/spiffe/spire
# 生成节点一次性 join token(实验环境)
spire-server token generate -spiffeID spiffe://example.org/host
# 创建注册条目(unix uid 选择器示例)
spire-server entry create \
-parentID spiffe://example.org/host \
-spiffeID spiffe://example.org/workload \
-selector unix:uid:1000
# 工作负载获取 X.509-SVID
spire-agent api fetch x509