简体   繁体   English

Kubernetes部署失败

[英]Failing a Kubernetes Deployment

I wonder if there is a way to have a deployment stop recreating new pods, when those failed multiple times. 我想知道当这些失败多次失败时,是否有一种方法可以使部署停止重新创建新的pod。 In other, given that we can't for instance have a restartPolicy never in a pod template of a Deployment, i am wondering, how can i consider a service failed and have in a stopped state. 换句话说,假设我们无法在Deployment的Pod模板中永远不会拥有restartPolicy,我想知道如何才能认为服务失败并处于停止状态。

We have a use case, where imperatively need to have kubernetes interrupt a deployment that have all his pods constantly failing. 我们有一个用例,当务之急是让kubernetes中断部署,使他的所有pod不断失败。

Consider using a type "Job" instead of Deployment. 考虑使用“作业”类型而不是“部署”。 According to the docs: 根据文档:

Use a Job for Pods that are expected to terminate, for example, batch computations. 将Job用于预期会终止的Pod,例如批处理计算。 Jobs are appropriate only for Pods with restartPolicy equal to OnFailure or Never. 作业仅适用于具有restartPolicy等于OnFailure或Never的Pod。

Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 kubernetes 中的 Spinnaker 部署失败 - Spinnaker deployment in kubernetes is failing Kubernetes部署因映像拉拔失败而失败 - Kubernetes deployment failing due to Image pull failure Selenium 4.0 Kubernetes 部署在节点注册时失败 - Selenium 4.0 Kubernetes deployment failing at node registration 失败的Kubernetes部署,期待char'“”'但得到char'8' - Failing Kubernetes deployment, expecting char '“”' but got char '8' Kubernetes Pod /容器部署失败意外开始出错 - Kubernetes pod / container deployment failing unexpectedly starts to error out Jfrog Xray Helm 部署在 Azure Kubernetes 服务上失败 - Jfrog Xray Helm deployment failing on Azure Kubernetes Serivice 在 Azure Kubernetes 中部署 MVC 应用程序失败并出现错误 - “Back-off restarting failed container” - Deployment of MVC app in Azure Kubernetes Service failing with error- “Back-off restarting failed container” 对kubernetes上的ravendb部署进行故障排除 - Troubleshooting a ravendb deployment on kubernetes kubernetes中每个部署的命名空间 - Namespace per deployment in kubernetes 使用Docker映像进行Kubernetes部署 - Kubernetes deployment with docker image
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM