• Home
  • Setup and configuration
  • Set up Dynatrace on container platforms
  • Kubernetes
  • Get started with Kubernetes/OpenShift monitoring
  • Migrate from OneAgent Operator to Dynatrace Operator on Kubernetes/OpenShift using kubectl/oc

Migrate from OneAgent Operator to Dynatrace Operator on Kubernetes/OpenShift using kubectl/oc

Understand and configure the DynaKube custom resource

The DynaKube custom resource (CR) replaces the OneAgent custom resource. The DynaKube CR follows the "don't repeat yourself" (DRY) principle to deploy a number of different components to your Kubernetes cluster.

Each section includes an illustration of the differences between the two custom resources, what changes from the old custom resource to the new one (marked with green), and what stays the same in both custom resource (marked with blue).

Changing operators will change the host ID calculations for monitored hosts, which will lead to monitoring anomalies in the Dynatrace UI.

Classic full-stack migration

Follow the instructions below to migrate from OneAgent Operator to Dynatrace Operator for classic full-stack injection.

Migration of properties

Global parameters (spec)
The following settings are global, shared by every component, and located under spec.

  • apiUrl

  • tokens1

  • skipCertCheck

  • proxy

  • trustedCAs

  • networkZone

  • customPullSecret

  • enableIstio

1

Tokens must point to an existing secret.

ClassicFullStack parameters (.spec.oneAgent.classicFullStack)
A new section for the full-stack OneAgent is located at .spec.oneAgent.classicFullStack:

  • image

  • autoUpdate1

  • version2

1

This was disableAgentUpdate in the OneAgent CR. The values are flipped for this field: disableAgentUpdate: true means autoUpdate: false. The default is still to enable automatic updates.

2

This was agentVersion in the OneAgent CR.

All the other OneAgent parameters (such as tolerations, arguments, DNS, and resource settings) are also located in the .spec.oneAgent.classicFullStack section and are unique to the full-stack installation.

Application-only migration

Follow the instructions below to migrate from OneAgent Operator to Dynatrace Operator for automatic application-only injection.

Cloud native app only

Global parameters (spec)
The following settings are global, shared by every component, and located under spec.

  • apiUrl

  • tokens1

  • skipCertCheck

  • proxy

  • trustedCAs

  • networkZone

  • customPullSecret

  • enableIstio

1

Tokens must point to an existing secret.

ApplicationMonitoring parameters (.spec.oneAgent.applicationMonitoring)
A new section for the full-stack OneAgent is located at .spec.oneAgent.applicationMonitoring:

  • version1

  • useCSIDriver2

1

This was agentVersion in the OneAgent CR.

2

This new parameter will deliver binaries to pods automatically and eliminate storage requirements on pods. This is in preview only and defaults to false.

The image parameter is no longer available. The functionality will be reintroduced in future. For now, all pods download from the API URL.

ActiveGate migration

As of OneAgent version 1.231, containerized ActiveGates can run multiple capabilities in the same container. The ActiveGate migration works automatically, but to take advantage of this functionality you have to make some changes manually.

Basic functionality

The Dynakube API v1alpha1 is automatically migrated to Dynakube API v1beta1:

Auto 1 ag

This way you get two pods with a single capability each.

Full functionality

After migration, you need to make the following conversion in the Dynakube custom resource manually:

Manual-2-AG

This way you get multiple capabilities in the same pod.

Global parameters (spec)
The following settings are global, shared by every component, and located under spec.

  • image

  • tolerations

  • nodeSelectors

  • resources

  • labels

  • group

  • customProperties

  • env

ActiveGate parameters (.spec.activegate.capabilities)
A new section for the full-stack OneAgent is located at .spec.activegate.capabilities and can be set to

  • routing

  • Kubernetes-monitoring

The enabled:true parameter is no longer available.

Conversion webhook

A webhook automatically converts the v1alpha1 routing/kubernetesMonitoring into the v1beta1 routing/kubernetesMonitoring sections. Any changes to resource, tolerations, or other parameters in the new combined ActiveGate section needs to be done manually.

Migrate from OneAgent Operator to Dynatrace Operator

You can migrate from the deprecated OneAgent Operator to the new Dynatrace Operator that manages the lifecycle of several Dynatrace components such as OneAgent, routing, and Kubernetes API Monitor. Additional components will be added as new observability features become available.

To migrate, you need to delete your existing configuration, then install Dynatrace Operator.

Select one of the following options, depending on your deployment methods.

  • Migrate with kubectl/oc
  • Migrate with Helm

Migrate with kubectl/oc

  1. Delete OneAgent Operator and the dynatrace namespace/project.

    Note: Be sure to replace <version> in the command below with your OneAgent Operator release version.

    plaintext
    kubectl delete -f https://github.com/Dynatrace/dynatrace-oneagent-operator/releases/download/<version>/kubernetes.yaml kubectl delete namespace dynatrace
    plaintext
    oc delete -f https://github.com/Dynatrace/dynatrace-oneagent-operator/releases/download/<version>/openshift.yaml oc delete project dynatrace
  2. Set up monitoring with Dynatrace Operator.

Migrate with Helm

  1. Remove OneAgent Operator, the Helm repository, and the dynatrace namespace/project.

    bash
    helm uninstall dynatrace-oneagent-operator kubectl delete -f https://github.com/Dynatrace/dynatrace-oneagent-operator/releases/download/v0.10.2/dynatrace.com_oneagentapms.yaml kubectl delete -f https://github.com/Dynatrace/dynatrace-oneagent-operator/releases/download/v0.10.2/dynatrace.com_oneagents.yaml helm repo remove dynatrace kubectl delete namespace dynatrace
    bash
    helm uninstall dynatrace-oneagent-operator oc delete -f https://github.com/Dynatrace/dynatrace-oneagent-operator/releases/download/v0.10.2/dynatrace.com_oneagentapms.yaml oc delete -f https://github.com/Dynatrace/dynatrace-oneagent-operator/releases/download/v0.10.2/dynatrace.com_oneagents.yaml helm repo remove dynatrace oc delete project dynatrace
  2. Set up monitoring with Dynatrace Operator.

Related topics
  • Kubernetes cluster and workload monitoring
  • Kubernetes/OpenShift monitoring

    Monitor Kubernetes/OpenShift with Dynatrace.