Recipes - Dynatrace - Rafay Product Documentation

Dynatrace

The controller provides integrated monitoring and visibility capabilities automatically deploying Prometheus and associated components on the managed Kubernetes clusters. In addition to the built in dashboards on the controller, some organizations may also wish to use a Dynatrace for their Kubernetes clusters' visibility.

This recipe describes how customers can standardize the configuration, deployment and lifecycle management of Dynatrace across their fleet of clusters. The Dynatrace Operator and Dynakube resources will be applied to each cluster that will be monitored. These resources will be added to a custom blueprint which will allow the resources to easily be applied to multiple clusters.

What Will You Do

In this exercise you will,

Important: This recipe describes the steps to create and use a custom cluster blueprint using the Web Console. The entire workflow can also be fully automated and embedded into an automation pipeline.

Assumptions

Step 1: Obtain Dynatrace Manifests

In this step you will obtain the manifest files for the Dynatrace resources. These manifests contain specific details for your resources and account.

Step 2: Create Namespace

Next, select the cluster to deploy the namespace to.

Next, you will publish the namespace to the cluster.

In a few seconds, the configured namespace will be deployed on the target cluster.

Step 3: Create Dynatrace Operator Add-on

In this step, you will create a custom cluster add-on for the Dynatrace Operator. The add-on will then be used in a custom cluster blueprint.

Step 4: Create Dynatrace Dynakube Add-on

In this step, you will create a custom cluster add-on for the Dynatrace Dynakube resources. The add-on will then be used in a custom cluster blueprint.

The updates should look similar to the following

kind: Secret
metadata:
  name: {{{ .global.Rafay.ClusterName }}
  namespace: dynatrace
type: Opaque
---
apiVersion: dynatrace.com/v1beta1
kind: DynaKube
metadata:
  name: {{{ .global.Rafay.ClusterName }}
  namespace: dynatrace

Step 5: Create Blueprint

Now, we are ready to assemble a custom cluster blueprint using the newly created Dynatrace add-ons.

Step 6: Apply Blueprint

Now, we are ready to apply this custom blueprint to a cluster.

This will start the deployment of the add-ons configured in the blueprint. The blueprint sync process can take a few minutes. Once complete, the cluster will display the current cluster blueprint details and whether the sync was successful or not.

Step 7: Verify Deployment

Users can optionally verify whether the correct resources have been created on the cluster. Click on the Kubectl button on the cluster to open a virtual terminal

kubectl get ns dynatrace
NAME         STATUS   AGE
dynatrace   Active   43m
kubectl get pod -n dynatrace
NAME                                  READY   STATUS    RESTARTS   AGE
dynatrace-cluster1-activegate-0       0/1     Running   0          110s
dynatrace-cluster1-oneagent-trz4q     1/1     Running   0          110s
dynatrace-operator-68d8bdb798-x8sjj   1/1     Running   0          2m54s
dynatrace-webhook-b45bd7d5b-c2fz2     1/1     Running   0          2m54s
dynatrace-webhook-b45bd7d5b-vt6k2     1/1     Running   0          2m54s

Step 8: Verify Data Collected

Next, you will verify the data collected in your Dynatrace account.

You should see your cluster.

Recap

Congratulations! You have successfully created a custom cluster blueprint with Dynatrace as an add-on. You then applied the blueprint to a managed cluster and viewed the Dynatrace dashboard for your cluster. You can now use this blueprint on as many clusters as you require.