• Home
  • Deploy
  • Kubernetes
  • Guides
  • Operation
  • Migrate Dynatrace Operator to a new environment

Migrate Dynatrace Operator to a new environment

If you're currently monitoring your Kubernetes cluster with a Dynatrace OneAgent rolled out through the Dynatrace Operator and you need to migrate to a different Dynatrace environment, select one of the following options, based on your deployment method.

  1. Delete the existing secret that holds the API and PaaS tokens for authenticating to the Dynatrace Cluster.

    bash
    kubectl delete secret dynakube -n dynatrace
  2. Create a new secret based on new tokens from your new environment.

  3. Override the old apiUrl in the custom resource file with the new one.

    bash
    kubectl edit dynakube dynakube -n dynatrace
  4. Restart your applications.

  1. Delete the existing secret that holds the API and PaaS tokens for authenticating to the Dynatrace Cluster.

    bash
    oc delete secret dynakube -n dynatrace
  2. Create a new secret based on new tokens from your new environment.

  3. Override the old apiUrl in the custom resource file with the new one.

    bash
    oc edit dynakube dynakube -n dynatrace
  4. Restart your applications.