Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

执行 minikube image save xxx:<none> 没有任何输出 #19612

Open
guoiaoang opened this issue Sep 11, 2024 · 0 comments
Open

执行 minikube image save xxx:<none> 没有任何输出 #19612

guoiaoang opened this issue Sep 11, 2024 · 0 comments
Labels
l/zh-CN Issues in or relating to Chinese

Comments

@guoiaoang
Copy link

比如执行 minikube addons enable yakd 可以启用 yakd 插件并拉取镜像,但是执行 minikube image list 时输出镜像名称为 docker.io/marcnuri/yakd:<none> ,这时在终端执行 minikube image save docker.io/marcnuri/yakd:<none> yakd.tar 时,当前终端及当前文件夹下并没有任何输出,而非<none>标签的镜像却可以正常导出镜像。

是否应该执行 minikube image list 时就输出可导出镜像的标签,而非 <none> ? 或者导出镜像失败直接在终端显示而非查看日志?以及我使用 minikube tag 时遇到 <none> 标签也是同样的问题。

命令示例:

# 错误情况,“<none>” 镜像,终端及文件均无任何输出
user@k8s-master:/ws/test$ minikube version
minikube version: v1.33.1
commit: 5883c09216182566a63dff4c326a6fc9ed2982ff
user@k8s-master:/ws/test$ minikube addons list | grep yakd
| yakd                        | minikube | enabled ✅   | 3rd party (marcnuri.com)       |
user@k8s-master:/ws/test$ minikube image list | grep yakd
docker.io/marcnuri/yakd:<none>
user@k8s-master:/ws/test$ minikube image list --format table | grep yakd
| docker.io/marcnuri/yakd                                            | <none>                                   | 31de47c733c91 | 202MB  |
user@k8s-master:/ws/test$ ll
总计 0
user@k8s-master:/ws/test$ minikube image save "docker.io/marcnuri/yakd:<none>" yakd.tar
user@k8s-master:/ws/test$ ll
总计 0
user@k8s-master:/ws/test$ minikube image save "docker.io/marcnuri/yakd" yakd.tar
user@k8s-master:/ws/test$ ll
总计 0
user@k8s-master:/ws/test$ minikube image save "docker.io/marcnuri/yakd:latest" yakd.tar
user@k8s-master:/ws/test$ ll
总计 0

# 实际可以导出的方法
user@k8s-master:/ws/test$ minikube kubectl -- describe pods -n yakd-dashboard | grep "Image ID"
    Image ID:       docker-pullable://marcnuri/yakd@sha256:a3f540278e4c11373e15605311851dd9c64d208f4d63e727bccc0e39f9329310
user@k8s-master:/ws/test$ minikube image save marcnuri/yakd@sha256:a3f540278e4c11373e15605311851dd9c64d208f4d63e727bccc0e39f9329310 yakd.tar
user@k8s-master:/ws/test$ ll
总计 195M
12716745 -rwxr-xr-x 1 user user 195M Sep 11 19:28 yakd.tar

# 正常情况,非 “<none>” 镜像,文件正常输出
user@k8s-master:/ws/test$ minikube image list | grep -v "<none>" | head -n 3 | sort
registry.k8s.io/coredns/coredns:v1.11.1
registry.k8s.io/etcd:3.5.12-0
registry.k8s.io/ingress-nginx/controller:v1.10.1
user@k8s-master:/ws/test$ minikube image save registry.k8s.io/coredns/coredns:v1.11.1 coredns.tar
user@k8s-master:/ws/test$ ll
总计 254M
12716744 -rwxr-xr-x 1 user user  59M Sep 11 19:08 coredns.tar
12716745 -rwxr-xr-x 1 user user 195M Sep 11 19:28 yakd.tar
user@k8s-master:/ws/test$
@guoiaoang guoiaoang added the l/zh-CN Issues in or relating to Chinese label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l/zh-CN Issues in or relating to Chinese
Projects
None yet
Development

No branches or pull requests

1 participant