# Change Environment to cluster Openshift

**URL:** <https://community.dynatrace.com/t/change-environment-to-cluster-openshift/35428>\
**Category:** Automations\
**Tags:** integrations, openshift\
**Created:** [June 9, 2022, 12:13pm UTC](https://community.dynatrace.com/t/change-environment-to-cluster-openshift/35428 "2022-06-09T12:13:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JAR](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@JAR](https://community.dynatrace.com/u/JAR)\
**Post date:** [June 9, 2022, 12:13pm UTC](https://community.dynatrace.com/t/change-environment-to-cluster-openshift/35428/1 "2022-06-09T12:13:51Z")

</div>

Hi all.  
We have the integration with an Openshift cluster reporting in one environment (PRE), but we want to change it to another environment (DEV). Both environments are in the same Managed tenant.

What would be the best way to do it?  
It is necessary to do a new installation?  
Or is it enough to edit the dynakube.yaml file?

- Environment URL
- Dynatrace Operator token
- ACtiveGate?
- …Something else to keep in mind…

Thanks in advance

BR

Jose A

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [June 9, 2022, 3:58pm UTC](https://community.dynatrace.com/t/change-environment-to-cluster-openshift/35428/2 "2022-06-09T15:58:07Z")

</div>

You mentioned the correct approach, you can just change the relevant entries in the dynakube yaml file.

Not 100% sure if it will redeploy the OneAgent pods automatically or if you have to cycle them once.

---

<div class="post-metadata">

**Author:** ![JAR](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@JAR](https://community.dynatrace.com/u/JAR)\
**Post date:** [June 10, 2022, 7:19am UTC](https://community.dynatrace.com/t/change-environment-to-cluster-openshift/35428/3 "2022-06-10T07:19:32Z")

</div>

Thank you very much for the reply [pahofmann.](https://community.dynatrace.com/user/22796)

To confirm the steps:  
1- edit yaml:

URL environment  
&nbsp; &nbsp; DT operator TOKEn

2- redeploy one agent pod:  
&nbsp; &nbsp; &nbsp; How is it done manually?

Thank you very much in advance

BR

joseA

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [June 10, 2022, 7:36am UTC](https://community.dynatrace.com/t/change-environment-to-cluster-openshift/35428/4 "2022-06-10T07:36:43Z")

</div>

As mentioned, not sure if the second is needed. You can just check after the update if it happens automatically and if not delete the OneAgent Pods yourself.

Now that I think about it, it will probably also require a restart of the deep monitored applications, so the code modules connect to the new environment.

---

<div class="post-metadata">

**Author:** ![Sujit](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/sujit/32/15043_2.png) [@Sujit](https://community.dynatrace.com/u/Sujit)\
**Post date:** [June 10, 2022, 7:46am UTC](https://community.dynatrace.com/t/change-environment-to-cluster-openshift/35428/5 "2022-06-10T07:46:11Z")

</div>

[@JAR](https://community.dynatrace.com/user/48634)&nbsp;Yes, you have to delete it as oneagent deployed as DeploymentSet so when you deleted it will create another OA automatically with updated new environment.

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [June 10, 2022, 2:06pm UTC](https://community.dynatrace.com/t/change-environment-to-cluster-openshift/35428/6 "2022-06-10T14:06:27Z")

</div>

Just realised there even is a documentation page for this:&nbsp;[Migrate Dynatrace Operator to a new environment — Dynatrace Docs](https://www.dynatrace.com/support/help/shortlink/migrate-operator-k8)
