2

我为运行三个容器(infra、mariadb 和本地容器映像)的 pod 生成了 YAML 定义:

podman generate kube > my-pod.yaml

然后我想使用定义进行部署:

podman play kube my-pod.yaml

当我想提出它时,podman 似乎避免从 localhost 中提取正常图像。错误是:

试图拉 localhost/myimg:latest... 获取 "https://localhost/v2/": dial tcp [::1]:443: connect: connection denied 错误: 无法拉 localhost/myimg:latest: 初始化错误源 docker://localhost/myimg:latest: ping docker 注册表时出错 localhost: Get "https://localhost/v2/": dial tcp [::1]:443: connect: connection denied

如何覆盖 podman 的这种行为?这里已经成功使用了这种容器管理方式,但是在那个例子中,没有本地镜像;仅使用存储库中的图像。

4

1 回答 1

3

我刚刚遇到了这个问题,并通过从 pod 图像中删除“:latest”标签对其进行了整理。当 :latest 标签存在时,这会导致 podman 始终尝试从远程存储库中提取图像,如此处所述 - https://kubernetes.io/docs/concepts/containers/images/

于 2020-09-25T04:23:50.493 回答