# A sidecar and init container for syncing data in StatefulSets

**URL:** <https://discuss.kubernetes.io/t/a-sidecar-and-init-container-for-syncing-data-in-statefulsets/16479>\
**Category:** General Discussions\
**Tags:** development\
**Created:** [June 26, 2021, 11:07am UTC](https://discuss.kubernetes.io/t/a-sidecar-and-init-container-for-syncing-data-in-statefulsets/16479 "2021-06-26T11:07:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![protosam](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/protosam/32/7732_2.png) [@protosam](https://discuss.kubernetes.io/u/protosam)\
**Post date:** [June 26, 2021, 11:07am UTC](https://discuss.kubernetes.io/t/a-sidecar-and-init-container-for-syncing-data-in-statefulsets/16479/1 "2021-06-26T11:07:32Z")

</div>

Wasn’t able to find something like this so I made it. I also made an example of using it to get cockroachdb up and running.

It uses SSL and tar for transport. It could probably be improved by throwing in some gzip functionality. If anyone finds this useful, let me know.

> **[scalabledelivery/init-sync](https://github.com/scalabledelivery/init-sync/)**
>
> Sidecar for securely copying directory for statefulsets. - scalabledelivery/init-sync
