Regarding to rancher 2.0 redeploy function


just wondering what is the purpose/function of redeploy workloads? i thought it was to restart workloads, end up deleting all my work or back to square one. i’ve deployed ubuntu image and configured/installed lemp stack. then i decided to redeploy (which i thought it was to restart workloads without affecting changes inside the image) but instead it restored back to its previous state without the configs/installed services etc.

note: no worries, i’ve installed rancher 2.0 for local environment for development and testing.


The typical use is to…Redeploy… a workload that uses “pull always” + the latest (or similar) image tag. The pods are replaced using the same process as any other change being made to the workload.

Pods are ephemeral and can be deleted at any time for lots of reasons (node failure, healthcheck not passing, disk pressure, etc). If you have data you want to keep it should be in an appropriate volume. There is no restart in k8s because they’re not supposed to be persistent. You just delete the pod and a new one is scheduled.

1 Like

thank you for the confirmation will be caution not to click that button again. :+1:

does this affect also when restarting/redeploying virtual machines? i tried shutting down vbox and restart it up, and when i viewed the services in ubuntu image workload, the services arent there or it restored to previous state.

what type of worlkload should i use? that will not affect the current changes of the image. or there is no other way.

We just used the “Redeploy” to recreate a pod after updating an env variable. A new pod has been created - but after that the pod was not longer under control of the “Catalog App” that deployed the pod initially. So we were forced to delete and deploy again.

Were not able to reproduce it.
Running Rancher-2.1.1

Any thoughts about that?

@vincent meaning you have to keep the pod always running and you can not restart or reload the pod. so rancher 2.0 is not good for local development using virtual machines, because if i shutdown/reload virtual machine it ends up redeploying the containers from the start-up. that is why everytime i restart/start the virtual machine the container with the images and services installed will be erased and it will go back to its previous state. this works only in remote environment, no need to restart/reload the server, it is because its always running. not like rancher 1.6 in a local dev environment all files, images and services installed in the container when redeploy/restart are still intact.