# K8s Pod Recreate causes Security Engine to get recreated

**URL:** <https://discourse.crowdsec.net/t/k8s-pod-recreate-causes-security-engine-to-get-recreated/1415>\
**Category:** Uncategorized\
**Created:** [September 12, 2023, 6:45am UTC](https://discourse.crowdsec.net/t/k8s-pod-recreate-causes-security-engine-to-get-recreated/1415 "2023-09-12T06:45:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BriianPowell](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/briianpowell/32/667_2.png) [@BriianPowell](https://discourse.crowdsec.net/u/BriianPowell)\
**Post date:** [September 12, 2023, 6:45am UTC](https://discourse.crowdsec.net/t/k8s-pod-recreate-causes-security-engine-to-get-recreated/1415/1 "2023-09-12T06:45:43Z")

</div>

When I create a new Crowdsec LApi Pod in K8s, the security engine is recreated in the crowdsec console and the old ID gets orphaned, is this expected behavior? or is the some config piece that I’m missing to allow for the ID to be persistent?

---

<div class="post-metadata">

**Author:** ![iiAmLoz](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/iiamloz/32/386_2.png) [@iiAmLoz](https://discourse.crowdsec.net/u/iiAmLoz)\
**Post date:** [September 12, 2023, 8:14am UTC](https://discourse.crowdsec.net/t/k8s-pod-recreate-causes-security-engine-to-get-recreated/1415/2 "2023-09-12T08:14:18Z")

</div>

You would have to persist the file within the LAPI

```auto
/etc/crowdsec/online_api_credentials.yaml

```

---

<div class="post-metadata">

**Author:** ![BriianPowell](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/briianpowell/32/667_2.png) [@BriianPowell](https://discourse.crowdsec.net/u/BriianPowell)\
**Post date:** [September 13, 2023, 7:45am UTC](https://discourse.crowdsec.net/t/k8s-pod-recreate-causes-security-engine-to-get-recreated/1415/3 "2023-09-13T07:45:44Z")

</div>

This was exactly that, I couldn’t find it anywhere in the documentation thank you so much 😃
