由于拉取镜像失败,一个 Deployment 部署失败
$ kubectl rollout status deployment ucenter-api
error: deployment "blog-api" exceeded its progress deadline
后来修复了拉取镜像问题,请问如何触发 kubernetes 进行重新部署?
在 github issue Force deployment rolling-update 中找到了答案
kubectl patch deployment blog-api -p \
"{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"`date +'%s'`\"}}}}}"
kubectl rollout restart deployment blog-api
正解,当时年少无知