title: Upgrade (Deployment + PVC) to Statefulset using helm
body: <p>We have realised the mistake of using a Deployment with a PVC for our stateful app instead of going with Statefulset. I was wondering how the upgrade would work. How can I point to the old data with the new statefulset ? I am guessing that the old PVC cannot be used by the volumeClaimTemplate ? I have not found anything via Google with my search abilities.</p>
  <p>Did anyone else go through this phase ? If you have, what was the process you followed ?</p>
  <p>Thanks.</p>
  <p>Adding some more details regarding the setup.</p>
  <ol>
  <li>Currently it is a simple deployment with no replicas. Just 1 deployment and 1 pod.</li>
  <li>PV+PVC is used to have a persistent volume mounted where we write all of the data.</li>
  <li>On Helm upgrade, we have a pre-upgrade hook added which mounts the same PV+PVC into the upgrade container and upgrades the data (Modifying XML files etc)</li>
  </ol>
  <p>It is simple, but the helm chart is bit too complicated with lots of other noise, but basically the application can be considered as simple as above.</p>
  <p>Now, what I am looking for in my next upgrade is a process where I can make the above deployment as a statefulset and also have all the data still usable by the Pod.</p>