Think before you speak, read before you think.

k8s 更新 docker image

如果 docker tag 不一样

kubectl set image deployment/myapp myapp=10.10.10.222:5000/myapp:v1.0.1 -n web

如果 docker tag 一样,image digest 不一样,则更新 image 使用 digest

查看 digest

docker images --digests

更新 image

kubectl set image deployment/myapp myapp=10.10.10.222:5000/myapp@sha256:f9d3c70ca6eb35bf33077f308dc526472d21d80b0234121bc93ada58bce99ee9 -n web

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *