Activate ActiveGate on Kubernetes using Dynatrace Operator

Starting with Dynatrace version 1.215, Dynatrace Operator manages the lifecycle of several Dynatrace components such as OneAgent and Kubernetes API Monitor. The DynaKube custom resource replaces the OneAgent custom resource. The DynaKube CR can deploy different ActiveGate pods to your Kubernetes cluster. For each module, you need to deploy a different ActiveGate. See ActiveGate purposes for details.

Connect your clusters to Dynatrace

Some Kubernetes pages require that your Kubernetes clusters be connected to Dynatrace. This connection creates relationships among applications, services, processes, hosts, and Kubernetes objects such as pods and namespaces.

To connect your clusters,

  1. Get the Kubernetes API URL.
kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}'

Note: If you set enableIstio to true in the Dynakube custom resource, use the command below to get the Kubernetes API URL:

kubectl get svc | grep kubernetes | awk -F' ' '{print "https://"$3}'
  1. Get the bearer token.
kubectl get secret $(kubectl get sa dynatrace-kubernetes-monitoring -o jsonpath='{.secrets[0].name}' -n dynatrace) -o jsonpath='{.data.token}' -n dynatrace | base64 --decode
  1. In the Dynatrace menu, go to Settings > Cloud and virtualization > Kubernetes.
  2. Select Connect new cluster.
  3. Provide a Name, the Kubernetes API URL, and the Bearer token for the Kubernetes cluster.

Note: For Rancher distributions, you need the bearer token that was created in the Rancher web UI, as described in Special instructions for Rancher distributions to get the API URL and the bearer token above.

  1. Turn on Enable monitoring and Show workloads and cloud applications.

In Dynatrace environments earlier than version 1.190, you need to turn on Cloud application and workload detection in the Process group detection settings. This way, cloud applications and workloads will be detected properly and process groups won't be spread across different cloud applications and workloads.

  1. Select Connect to save your configuration.

ActiveGate update behavior

ActiveGate is updated automatically on pod restart whenever there is a new version available, unless the image version is specified in cr.yaml.