Use StatefulSet instead of Deployment for some pods?

Hello Everyone !

I have deployed Airbyte in kubernetes where most of the components are deployed as “Deployments”. Now if the Airbyte deployment gets deleted it deletes the persistent volumes also which deletes all the connections and other states of connections as well. To avoid this situation, what does Airbyte recommend please ?


Hey ideally pvc are not deleted unless you use some delete all commands. But you can look into `finalizers:

Hi Harshith,
I understand what you are talking about but what my concern is more towards like if I run command like kubectl delete -f .yaml ( may be db or minio etc. ) due to any reason mistakenly or something, it will delete the pods as well as the pvc’s attached to these pods. Now when I deploy the deleted yaml’s it will recreate the pods and pvc where the previous state of connections or custom connectors would be missing, right ?
Now if these would have been statefulsets with PVC as retained the new pods will be reattached to the existing pvc’s retaining the state of connections as well as custom connectors.
Hope I am making any sense.

Akhtar Bhat

Yeah got it. Would suggest to create an issue in Github around this so that team can discuss around this.