# initContainer 部署

**URL:** <https://community.dynatrace.com/t/initcontainer/42644>\
**Category:** Open Q&A\
**Tags:** installation\
**Created:** [November 16, 2023, 7:03am UTC](https://community.dynatrace.com/t/initcontainer/42644 "2023-11-16T07:03:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![C\_T\_R\_L](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@C\_T\_R\_L](https://community.dynatrace.com/u/C_T_R_L)\
**Post date:** [November 16, 2023, 7:03am UTC](https://community.dynatrace.com/t/initcontainer/42644/1 "2023-11-16T07:03:03Z")

</div>

I have a requirement to monitor the specified pod. [Application observability with pod runtime injection - Dynatrace Docs](https://docs.dynatrace.com/docs/setup-and-configuration/setup-on-k8s/installation/other/pod-runtime#application-observability-with-pod-runtime-injection)if the method of initContainer is used, where do these parameters of initContainer need to be added in deployment.yuml? Do I need to write if else criteria

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [November 16, 2023, 12:27pm UTC](https://community.dynatrace.com/t/initcontainer/42644/2 "2023-11-16T12:27:10Z")

</div>

Regarding the use of “if-else” criteria, it’s generally not needed in the deployment YAML file. The initContainer will run before your main containers start, and its job is to set up everything needed for monitoring.

---

<div class="post-metadata">

**Author:** ![C\_T\_R\_L](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@C\_T\_R\_L](https://community.dynatrace.com/u/C_T_R_L)\
**Post date:** [November 17, 2023, 2:04am UTC](https://community.dynatrace.com/t/initcontainer/42644/3 "2023-11-17T02:04:37Z")

</div>

Thank you very much for your answer. I will try it according to this method
