k8s中 docker和containerd 镜像相互导入导出

containerd镜像导出并导入docker

1 查看containerd 本地镜像列表

复制代码
crictl images 

2 containerd 导出本地镜像到当前目录下(注意: 导出导入需要指定镜像平台类型 --platform

复制代码
ctr -n k8s.io images export nacos-server-24-06-30-13-02-02.tar  docker.io/nacos/nacos-server:v2.1.2  --platform linux/amd64

3 将当前目录下tar 复制到远程docker主机下

复制代码
scp nacos-server-24-06-30-13-02-02.tar root@101.133.22.13:~ 

4 docker 加载tar镜像包

复制代码
docker load -i nacos-server-24-06-30-13-02-02.tar 

docker 镜像导出并导入containerd

1 docker保存镜像为tar文件

复制代码
docker save alpine:3.15 > alpine-3.15.tar

2 上传镜像到需要的节点, (这里直接本机操作,跳过)

复制代码
scp alpine-3.15.tar root@192.168.232.6:~

3 将tar导入到containerd镜像中(注意: 导出导入需要指定镜像平台类型 --platform,不然会出问题。

复制代码
ctr -n k8s.io images import alpine-3.15.tar --platform linux/amd64

4 检查containerd 本地镜像

复制代码
[root@master ~]# crictl images
IMAGE                                                             TAG                 IMAGE ID            SIZE
...
docker.io/library/alpine                                          3.15                c059bfaa849c4       5.87MB
...
相关推荐
mounter62516 小时前
深入解析 RDMA 中的 Address Handler (AH) 缓存:AWS EFA 驱动的硬件演进与软件复用艺术
linux·kernel·rdma·hashtable·hash table·address handle
jarreyer1 天前
【AI Agent】大模型自动化载体
运维·自动化
xixingzhe21 天前
SpringBoot + Nginx 免鉴权接口安全防护方案
运维·nginx·安全
翼龙云_cloud1 天前
阿里云国际代理商:阿里云 ECS 全维度监控配置教程
运维·阿里云·云计算·监控
Tronlong创龙1 天前
SBC-TL3588 单板机 / EPC-TL3588 工控机 Docker 开发手册(二)
docker·开发板·嵌入式开发·硬件开发·工业控制
笑锝没心没肺1 天前
fail2ban工具安装配置及使用
linux·运维·服务器
zt1985q1 天前
本地部署开源智能家居集成平台 ioBroker 并实现外部访问( Windows 版本)
运维·服务器·智能家居
大卡片1 天前
linux内核驱动开发
linux·运维·驱动开发
心心喵1 天前
[linux] nohup和pm2的区别 进程保活
linux·运维·服务器
NGINX开源社区1 天前
F5 NGINX Ingress Controller 5.3.0 新增功能
运维