docker save –o /data/testimage.tar testimage:latest
- 存出本地的刚才创建的testimage:lastest为镜像文件testimage.tar文件:
- 获取命名空间下的pod Service:
kubectl get po,svc -o wide -n tenant-wf1sxilpnx-sz1-clq7600051
- 进入pod :
kubectl exec -it tomcat-cluster-76566d6b89-4lm9t bash -n tenant-wf1sxilpnx-sz1-clq7600051
- 载入镜像:
docker load < testimage.tar
- 镜像tag push :
docker tag testimage:lastest zmc/testimage:lastestdocker pushzmc/testimage:lastest