Deploy OneAgent Operator on Kubernetes (deprecated)
This procedure is deprecated.
- If you are making a fresh installation, you should set up Kubernetes monitoring using Dynatrace Operator.
- If you already have OneAgent installed using OneAgent Operator, please see the instructions for migrating to Dynatrace Operator.
Installation
Find out below how to install and configure OneAgent.
After deployment, you need to restart your pods so OneAgent can inject into them.
Cluster-wide permissions
The following table shows the permissions needed for OneAgent Operator.
Nodes
Namespaces
Secrets
Secrets
dynatrace-oneagent-config
, dynatrace-oneagent-pull-secret
Limitations
See Docker limitations for details.
Troubleshoot
Find out how to troubleshoot issues that you may encounter when deploying OneAgent on Kubernetes.
Deploy an ActiveGate and connect your Kubernetes API to Dynatrace
Now that you have OneAgent running on your Kubernetes nodes, you're able to monitor those nodes, and the applications running in Kubernetes. The next step is to deploy an ActiveGate and connect your Kubernetes API to Dynatrace in order to get native Kubernetes metrics, like request limits, and differences in pods requested vs. running pods.
For further instructions see Deploy ActiveGate in Kubernetes as a StatefulSet.
Update OneAgent Operator with kubectl
OneAgent Operator (for Kubernetes version 1.9+) automatically takes care of the lifecycle of the deployed OneAgents, so you don't need to update OneAgent pods yourself.
Review the release notes of the Operator for any breaking changes on the custom resource.
If the custom resource of the new version is compatible with the already deployed version, you can simply set the OneAgent Operator image to the new tagged version. Be sure to replace vX.Y.Z
with the new version in the following command:
kubectl -n dynatrace set image deployment \dynatrace-oneagent-operator *=quay.io/dynatrace/\dynatrace-oneagent-operator:vX.Y.Z
The image version of the OneAgent Operator is independent from the OneAgent version. To check the available versions for the Operator, see the OneAgent Operator releases.
To update OneAgent Operator, run the following command:
kubectl apply -f https://github.com/Dynatrace/dynatrace-oneagent-operator/releases/latest/download/kubernetes.yaml
Update OneAgent Operator with Helm
-
Update your Helm repositories.
helm repo updateAnother method of updating the Dynatrace OneAgent Helm repository is adding it again, which overwrites the older version.
-
Update OneAgent to the latest version.
Don't omit the
--reuse-values
flag in the command in order to keep your configuration.helm upgrade dynatrace-oneagent-operator dynatrace/\dynatrace-oneagent-operator -n dynatrace --reuse-values