okteto: Recrate pods in error state on `okteto deploy`

Is your feature request related to a problem? Please describe. okteto deploy leave pods on error state because of an infra problem. If I run okteto deploy again and the infra issue is solved, my pods continue in error state until k8s retries to schedule them.

Describe the solution you’d like okteto deploy should always recreate pods if they are in error state.

Describe alternatives you’ve considered Let the user recreate the pods manually, but this requires context about kubernetes

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (19 by maintainers)

Most upvoted comments

What would be the value for a pod with the key as deployed-by? Is it the name of the pod?

@abs007 it’s the name of the git repo. Or the name property of the okteto manifest if defined

I couldn’t find the deploy-by label but instead found a deployed-by label. Did you mean that?

Right, it’s deployed-by

@abs007 awesome, I assigned it to you. All pods created by okteto deploy have a deploy-by label. You can use that to identify the pods and destroy them if they are in a failing state since before the last okteto deploy command is executed