Get started with Full observability (classic full stack deployment)
This page provides instructions for deploying the Dynatrace Operator in classic full stack configuration to a Kubernetes cluster.
Before you begin
Before installing Dynatrace on your Kubernetes cluster, ensure that you meet the following requirements:
- Your
kubectl
CLI is connected to the Kubernetes cluster that you want to monitor. - You have sufficient privileges on the monitored cluster to run
kubectl
oroc
commands.
Cluster setup and configuration
You must allow egress for Dynatrace pods (default: Dynatrace namespace) to your Dynatrace environment or to your Environment ActiveGate
- For OpenShift Dedicated, you need the cluster-admin role.
- Helm installation Use Helm version 3.
Supported versions
See supported Kubernetes/OpenShift platform versions and distributions.
Installation options
Choose one of the installation methods that best suits your needs.
Guided (Dynatrace UI)
-
In the Dynatrace menu go to Kubernetes.
-
Select Connect automatically via Dynatrace Operator in the header of the Kubernetes cluster page.
-
Enter the following details.
-
Name: Defines the display name of your Kubernetes cluster within Dynatrace. Additionally, this name will be used as a prefix for naming Dynatrace-specific resources inside your Kubernetes cluster, such as DynaKube (custom resource), ActiveGate (pod), OneAgents (pods), and as a name for the secret holding your tokens.
-
recommended Group: Defines a group used by various Dynatrace settings, including network zone, ActiveGate group, and host group. If not set, defaults or empty values are used.
-
Dynatrace Operator token: Select Create token or enter the API token you previously created. For more information, see Access tokens and permissions.
-
Data ingest token: not applicable for this deployment option
-
-
optional Decide whether you want the Dynatrace Operator to disable the verification of the Dynatrace SSL certificate.
This is relevant if you are using Dynatrace Managed with self-signed certificates.
-
Turn on Enable volume storage if you deploy on one of the following Kubernetes distributions: Google Kubernetes Engine (GKE), SUSE Container as a Service (CaaS), VMware Tanzu Kubernetes Grid Integrated Edition (TGKI) or IBM Kubernetes Service (IKS).
-
Select Download dynakube.yaml. Copy the code block created by Dynatrace created and run it in your terminal. Ensure you execute the commands in the same directory where you downloaded the YAML or adapt the command to link to the location of the YAML manifest.
The downloaded YAML file is a basic version of the DynaKube custom resource definition. To adjust values to your specific needs, refer to the DynaKube custom resource samples from GitHub. For more information about all configuration options, see DynaKube parameters for Dynatrace Operator.
-
optional Verify that your DynaKube is running and all pods in your Dynatrace namespace are running and ready.
1> kubectl get dynakube -n dynatrace2NAME APIURL STATUS AGE3dynakube https://<ENVIRONMENTID>.live.dynatrace.com/api Running 45sIn a default DynaKube configuration, you should see the following pods:
1> kubectl get pods -n dynatrace2NAME READY STATUS RESTARTS AGE3dynakube-activegate-0 1/1 Running 0 50s4dynakube-oneagent-2wnbb 1/1 Running 0 50s5dynakube-oneagent-wp2bt 1/1 Running 0 50s6dynakube-oneagent-pxdv4 1/1 Running 0 50s7dynatrace-operator-8445c87f87-qhc5t 1/1 Running 0 3m02s8dynatrace-webhook-56644487df-ws7gg 1/1 Running 0 3m02s9dynatrace-webhook-56644487df-xkxkd 1/1 Running 0 3m02sAs OneAgent is deployed as DaemonSet, you should have a OneAgent pod on each node.
Manifest
-
Create a
dynatrace
namespace1kubectl create namespace dynatrace -
Install Dynatrace Operator
1kubectl apply -f https://github.com/Dynatrace/dynatrace-operator/releases/download/v0.14.0/kubernetes.yamlRun the following command to see when Dynatrace Operator components finish initialization:
1kubectl -n dynatrace wait pod --for=condition=ready --selector=app.kubernetes.io/name=dynatrace-operator,app.kubernetes.io/component=webhook --timeout=300s -
Create secret for access token
Create a secret named
dynakube
for the Dynatrace Operator token obtained in Tokens and permissions required.1kubectl -n dynatrace create secret generic dynakube --from-literal="apiToken=<OPERATOR_TOKEN>" -
Apply the DynaKube custom resource
Download the DynaKube custom resource sample for classic full stack from GitHub. In addition, you can review the available parameters or how-to guides, and adapt the DynaKube custom resource according to your requirements.
Run the command below to apply the DynaKube custom resource, making sure to replace
<your-DynaKube-CR>
with your actual DynaKube custom resource file name. A validation webhook will provide helpful error messages if there's a problem.1kubectl apply -f <your-DynaKube-CR>.yaml -
optional Verify deployment
Verify that your DynaKube is running and all pods in your Dynatrace namespace are running and ready.
1> kubectl get dynakube -n dynatrace2NAME APIURL STATUS AGE3dynakube https://<ENVIRONMENTID>.live.dynatrace.com/api Running 45sIn a default DynaKube configuration, you should see the following pods:
1> kubectl get pods -n dynatrace2NAME READY STATUS RESTARTS AGE3dynakube-activegate-0 1/1 Running 0 50s4dynakube-oneagent-2wnbb 1/1 Running 0 50s5dynakube-oneagent-wp2bt 1/1 Running 0 50s6dynakube-oneagent-pxdv4 1/1 Running 0 50s7dynatrace-operator-8445c87f87-qhc5t 1/1 Running 0 3m02s8dynatrace-webhook-56644487df-ws7gg 1/1 Running 0 3m02s9dynatrace-webhook-56644487df-xkxkd 1/1 Running 0 3m02sAs OneAgent is deployed as DaemonSet, you should have a OneAgent pod on each node.
Helm
Dynatrace Operator version 0.8.0+
-
Add the Dynatrace Helm repository
1helm repo add dynatrace \2https://raw.githubusercontent.com/Dynatrace/dynatrace-operator/main/config/helm/repos/stableNote that attempting to access the above URL will result in a 404 error page as it is only used internally by the Helm client.
-
Install Dynatrace Operator
You have two options:
Option 1: Install Dynatrace Operator using the default values:
1helm install dynatrace-operator dynatrace/dynatrace-operator \2 --set "installCRD=true" \3 --atomic \4 --create-namespace --namespace dynatraceOption 2: For additional configuration to the Helm chart, edit the
values.yaml
sample from GitHub, then run the install command passing the YAML file as an argument:1helm install dynatrace-operator dynatrace/dynatrace-operator \2 -f values.yaml \3 --atomic \4 --create-namespace --namespace dynatraceIf
installCRD
is set tofalse
, you need to create the custom resource definition manually before starting the Helm installation:1kubectl apply -f https://github.com/Dynatrace/dynatrace-operator/releases/download/v0.14.0/dynatrace-operator-crd.yaml -
Create secret for access token
Create a secret named
dynakube
for the Dynatrace Operator token obtained in Tokens and permissions required.1kubectl -n dynatrace create secret generic dynakube --from-literal="apiToken=<OPERATOR_TOKEN>" -
Apply the DynaKube custom resource
Download the DynaKube custom resource sample for classic full stack from GitHub. In addition, you can review the available parameters or how-to guides, and adapt the DynaKube custom resource according to your requirements.
Run the command below to apply the DynaKube custom resource, making sure to replace
<your-DynaKube-CR>
with your actual DynaKube custom resource file name. A validation webhook will provide helpful error messages if there's a problem.1kubectl apply -f <your-DynaKube-CR>.yaml -
optional Verify deployment
Verify that your DynaKube is running and all pods in your Dynatrace namespace are running and ready.
1> kubectl get dynakube -n dynatrace2NAME APIURL STATUS AGE3dynakube https://<ENVIRONMENTID>.live.dynatrace.com/api Running 45sIn a default DynaKube configuration, you should see the following pods:
1> kubectl get pods -n dynatrace2NAME READY STATUS RESTARTS AGE3dynakube-activegate-0 1/1 Running 0 50s4dynakube-oneagent-2wnbb 1/1 Running 0 50s5dynakube-oneagent-wp2bt 1/1 Running 0 50s6dynakube-oneagent-pxdv4 1/1 Running 0 50s7dynatrace-operator-8445c87f87-qhc5t 1/1 Running 0 3m02s8dynatrace-webhook-56644487df-ws7gg 1/1 Running 0 3m02s9dynatrace-webhook-56644487df-xkxkd 1/1 Running 0 3m02sAs OneAgent is deployed as DaemonSet, you should have a OneAgent pod on each node.
Learn more
After you've successfully installed the Dynatrace Operator, you may find the following resources helpful for further learning and troubleshooting.
Get actionable answers
Start to analyze your Kubernetes clusters and containerized Apps with Dynatrace and benefit from actionable answers.
Guides
Learn how you can configure Dynatrace Operator to support specific use cases.
Troubleshooting
Troubleshoot any challenges you may encounter while working with the Dynatrace Operator and its various components.
How it works
Want to learn more about the Dynatrace components in your Kubernetes cluster?
Reference
API reference and configuration options for all Dynatrace components within your Kubernetes cluster.
Dynatrace Operator release notes
See release notes for Dynatrace Operator.
Update or uninstall
This page provides a detailed instructions on how to update and uninstall Dynatrace Operator.