Find out how to troubleshoot the possible issues you might encounter when deploying OneAgent on Kubernetes, or any connectivity errors that you might get when trying to connect your Kubernetes clusters to Dynatrace.
Issues occurring when deploying OneAgent
In case you encounter a problem, you can review the logs provided by OneAgent Operator by running
$ kubectl -n dynatrace logs -f deployment/dynatrace-oneagent-operator
You might also want to check the logs from OneAgent pods deployed through OneAgent Operator.
$ kubectl get pods -n dynatrace NAME READY STATUS RESTARTS AGE dynatrace-oneagent-operator-64865586d4-nk5ng 1/1 Running 0 1d oneagent-66qgb 1/1 Running 0 22h
$ kubectl logs oneagent-66qgb -n dynatrace
$ kubectl get ds/dynatrace-oneagent --namespace=kube-system NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE-SELECTOR AGE dynatrace-oneagent 1 1 0 1 0 beta.kubernetes.io/os=linux 14mc
$ kubectl logs -f dynatrace-oneagent-abcde --namespace=kube-system 09:46:18 Started agent deployment as docker image, PID 1234. 09:46:18 Agent installer can only be downloaded from secure location. Your installer URL should start with 'https': REPLACE_WITH_YOUR_URL
Change the value
REPLACE_WITH_YOUR_URL in the
dynatrace-oneagent.yml DaemonSet with the Dynatrace OneAgent installer URL.
$ kubectl get pods --namespace=kube-system NAME READY STATUS RESTARTS AGE dynatrace-oneagent-abcde 0/1 ContainerCreating 0 3s
$ kubectl logs -f dynatrace-oneagent-abcde --namespace=kube-system Error from server (BadRequest): container "dynatrace-oneagent" in pod "dynatrace-oneagent-abcde" is waiting to start: ContainerCreating
This is typically the case if the container hasn't yet fully started. Simply wait a couple of seconds.
$ kubectl get pods --namespace=kube-system NAME READY STATUS RESTARTS AGE dynatrace-oneagent-abcde 1/1 Running 0 1m
This is typically caused by a timing issue that occurs if application containers have started before OneAgent was fully installed on the system. As a consequence, some parts of your application run uninstrumented. To be on the safe side, OneAgent should be fully integrated before you start your application containers. If your application has already been running, restarting its containers will have the very same effect.
Connectivity issues between Dynatrace and your cluster
The certificate for the communication is invalid or expired. If you're using a self-signed certificate, check the mitigation procedures for the ActiveGate.
Check if you entered the correct endpoint URL, double-check the port used and make sure the ActiveGate can reach and connect to the endpoint.
The bearer token is invalid and the request has been rejected by the Kubernetes API. Verify the bearer token. Make sure it doesn't contain any whitespaces. If you're connecting to a Kubernetes cluster API via a centralized external role-based access control (RBAC) consult the documentation of the Kubernetes cluster manager. For Rancher see the guidelines on the official Rancher page.
There is already a request pending for this integration with an ActiveGate. Wait for a couple minutes and check back.