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.
Note: By default, logs are located in
Issues occurring when deploying OneAgent
Dynatrace Operator for Kubernetes
In case you encounter a problem, you can review the logs provided by Dynatrace Operator by running
kubectl -n dynatrace logs -f deployment/dynatrace-operator
You might also want to check the logs from OneAgent pods deployed through Dynatrace Operator.
kubectl get pods -n dynatrace NAME READY STATUS RESTARTS AGE dynatrace-operator-64865586d4-nk5ng 1/1 Running 0 1d dynakube-classic-8r2kq 1/1 Running 0 22h
kubectl logs oneagent-66qgb -n dynatrace
DaemonSet for Kubernetes
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.
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 website.
There is already a request pending for this integration with an ActiveGate. Wait for a couple minutes and check back.