devspace-sh / devspace

DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
https://devspace.sh
Apache License 2.0
4.19k stars 351 forks source link

devspace pod reset #1503

Open sczhh opened 2 years ago

sczhh commented 2 years ago

If my devspace.yaml file is missing, how do I reset the Pod, and can I provide an automatic Pod reset function?

FabianKramm commented 2 years ago

@sczhh thanks for creating this issue! If your devspace.yaml is missing, you can reset your deployments via kubectl:

# Delete the replaced pods
kubectl delete po -n my-namespace --selector devspace.sh/replaced=true

# Scale up the deployment
kubectl scale deployment.v1.apps/my-deployment -n my-namespace --replicas=1

Not exactly sure what you mean with automatic pod reset function, could you elaborate on this?

LukasGentele commented 2 years ago

Instead of true, why don't we save the deployment or statefulset name in the annotation and make the reset function work even without the config? Or alternatively, add a second annotation.