Find out how to solve problems that you may encounter when deploying OneAgent on Kubernetes.
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 14m
$ 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
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.