pod的重启策略是什么?

千锋教育

可以通过命令kubectl explain pod.spec查看pod的重启策略。(restartPolicy字段)


Always:但凡pod对象终止就重启,此为默认策略


OnFailure:仅在pod对象出现错误时才重启