解决 Linkerd 报错 Trust anchor certificate has expired 根证书过期修复
排查 Linkerd 服务网格数据平面抛出 proxy traffic failed: certificate expired,分析 trust anchor 与 issuer 证书轮换流程。
问题现象
运行 linkerd check 发现集群多项标红,Pod 间流量被阻断:
linkerd-identity
----------------
√ certificate config is valid
× trust anchor certificate is not expired
trust anchor certificate has expired: 2026-11-10T00:00:00Z
触发根因
- Linkerd 控制平面的 Trust Anchor 根证书有效期达到上限(默认 1 年);
- 未实施自动化证书轮换计划,导致数据平面代理互相判定对方握手证书不合法。
解决步骤
使用 step 工具重新签发新根证书与颁发机构证书
生成包含新旧公钥的过渡 bundle:
step certificate create root.linkerd.cluster.local root.crt root.key \
--profile root-ca --no-password --insecure
使用 linkerd upgrade 命令无缝轮转 Trust Anchor
执行平滑升级:
linkerd upgrade --identity-trust-anchors-file root.crt | kubectl apply -f -
验证确认
重新运行诊断:
linkerd check --proxy
所有检查项全绿,网格内部 mTLS 加密通信无中断恢复。


