K8S篇之k8s containerd模式fail to pull image certificate signed by unknown authority

"k8s containerd模式fail to pull image certificate signed by unknown authority"的问题
解决方案:您有两个选择:配置证书或禁用证书验证。

配置证书:您可以为 containerd 配置证书,使其信任由未知机构签名的证书。
具体步骤如下:

找到未知机构签名的证书文件,确保证书文件是正确的并且是完整的。

在 Kubernetes worker 节点上找到 containerd 的配置文件,一般位于/etc/containerd/config.toml。

编辑 config.toml 文件,在 plugins."io.containerd.grpc.v1.cri".registry.mirrors."your_registry_domain".tls

1、部分添加以下内容:

复制代码

python 复制代码
ca_file = "/path/to/your_certificate_file.crt"

其中,your_registry_domain 是您的镜像仓库域名,/path/to/your_certificate_file.crt 是您证书文件的路径。

2、重启 containerd 服务以使更改生效

python 复制代码
systemctl restart containerd。

禁用证书:如果您希望完全禁用证书验证,可以进行以下操作:

在 Kubernetes worker 节点上找到 containerd 的配置文件,一般位于/etc/containerd/config.toml。

1、编辑 config.toml 文件,在 plugins."io.containerd.grpc.v1.cri".registry.mirrors."your_registry_domain".tls 部分添加以下内容:

python 复制代码
// 复制代码
insecure_skip_verify = true

其中,your_registry_domain 是您的镜像仓库域名。

2、重启 containerd 服务以使更改生效

python 复制代码
systemctl restart containerd

但请注意,禁用证书验证会导致容器镜像下载过程中忽略证书验证,可能会带来一定的安全风险。所以最好的做法是配置正确的证书来解决验证问题。

相关推荐
我不会起名字3223 小时前
eBPF 与 perf 性能观测:On-CPU、Off-CPU 火焰图与内核探针的 4 个边界
linux·云原生·ebpf·perf·性能观测
阿里云云原生4 小时前
阿里云三大新发布,开源、新品、升级
云原生
阿里云云原生4 小时前
运维团队的新同事来了:STAROps 7 位数字专家亮相
云原生
阿里云云原生4 小时前
别再替 Agent 找工具了:Nacos Agent Plugin 让它自己找
云原生
木雷坞5 小时前
n8n Docker 读不到 CSV,先分清宿主机目录和容器路径
java·docker·容器
一水鉴天5 小时前
统筹表和三型条目(梯子/轮子/旗子) - 豆包 20261102
人工智能·云原生·架构
阿里云云原生5 小时前
SLS 数据语义效果评测:有了语义模型,Agent 能答得更准吗?
云原生
阿里云云原生6 小时前
阿里云百炼推出正式版决策模型,HiRoute 实测超越 OpenAI Decisions
云原生
那明眸似水6 小时前
OpenEuler 22.03 实战部署 Harbor 2.12 并推送 K8s 镜像全记录
java·容器·kubernetes
阿里云云原生6 小时前
码上 2027丨阿里云 AgentCore 邀你造世界
云原生