【发布时间】:2020-10-23 05:02:44
【问题描述】:
我有一个 Pod - 我想更新到最新版本的容器映像,如果失败,然后想将其恢复到早期版本的容器映像。
以下哪种方法适合更新到最新或更早的容器映像。 1> 使用 kubectl 补丁是不错的选择? 2> 删除 pod 并重新创建 pod 是不错的选择吗?
这两种方法的优缺点是什么。
kubectl patch pod test-pod -p '{"spec":{"containers":[{"name":"test","image":"1.0"}]}}'
kubectl delete pod test-pod and kubectl apply -f testpod.yaml
【问题讨论】:
标签: kubernetes kubectl kubernetes-pod