cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using Dynatrace for monitoring Kubernetes

emrepehlivan53
Newcomer_

I installed Dynatrace on Mac docker desktop and Kubernetes.

kubectl get all -n dynatrace
When I check the status of the pods with the command, I see that the OneAgent pod is not Running.

The error details are as follows, I would appreciate your help.

 

  Type     Reason     Age                   From               Message

  ----     ------     ----                  ----               -------

  Normal   Scheduled  13m                   default-scheduler  Successfully assigned dynatrace/kubernetes-cluster-oneagent-hrfm4 to docker-desktop

  Normal   Pulled     13m                   kubelet            Successfully pulled image "beu62464.live.dynatrace.com/linux/oneagent:latest" in 588.343042ms

  Normal   Pulled     13m                   kubelet            Successfully pulled image "beu62464.live.dynatrace.com/linux/oneagent:latest" in 642.174709ms

  Normal   Pulled     13m                   kubelet            Successfully pulled image "beu62464.live.dynatrace.com/linux/oneagent:latest" in 629.661083ms

  Normal   Pulled     13m                   kubelet            Successfully pulled image "beu62464.live.dynatrace.com/linux/oneagent:latest" in 659.203876ms

  Normal   Started    13m (x4 over 13m)     kubelet            Started container dynatrace-oneagent

  Normal   Pulling    12m (x5 over 13m)     kubelet            Pulling image "beu62464.live.dynatrace.com/linux/oneagent:latest"

  Normal   Created    12m (x5 over 13m)     kubelet            Created container dynatrace-oneagent

  Normal   Pulled     12m                   kubelet            Successfully pulled image "beu62464.live.dynatrace.com/linux/oneagent:latest" in 646.161876ms

  Warning  BackOff    3m48s (x45 over 13m)  kubelet            Back-off restarting failed container

 

Pod logs;

18:34:21 Bootstrapping regular deployment

18:34:21 Started agent deployment as a container, PID 26592.

18:34:21 System version: Linux docker-desktop 5.15.49-linuxkit #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

source=auto

18:34:21 Installed version:

18:34:21 Using pre-packed installer, no download from external location will be performed.

18:34:21 ONEAGENT_INSTALLER_SCRIPT_URL=

18:34:21 ONEAGENT_INSTALLER_DOWNLOAD_TOKEN=

18:34:21 ONEAGENT_INSTALLER_DOWNLOAD_VERBOSE=

18:34:22 ONEAGENT_INSTALLER_SKIP_CERT_CHECK=

18:34:22 ONEAGENT_ENABLE_VOLUME_STORAGE=false

18:34:22 ONEAGENT_CONTAINER_STORAGE_PATH=

18:34:22 ONEAGENT_NO_REMOUNT_ROOT=

18:34:22 ONEAGENT_ADDITIONAL_UNMOUNT_PATTERN=

18:34:22 ONEAGENT_DISABLE_CONTAINER_INJECTION=

18:34:22 ONEAGENT_READ_ONLY_MODE=

18:34:22 AGENT_CONTAINER_IMAGE_VERSION=1.259.308.20230213-101807

18:34:22 Path: /usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

18:34:22 Started with capabilities: self: cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_net_admin,cap_net_raw,cap_sys_chroot,cap_sys_ptrace,cap_sys_admin,cap_sys_resource,cap_setfcap=ep

18:34:22 Started with user: uid=0(root) gid=0(root) groups=0(root)

18:34:22 Error: Container was launched without --net parameter

18:34:23 Error: Dynatrace OneAgent requires parameters: --pid and --net set to 'host'.

18:34:23 If you are not sure how to launch the container please visit: https://www.dynatrace.com/support/help/shortlink/oneagent-docker

18:34:23 Error: Initialization procedure failed

 

5 REPLIES 5

shahinm
Dynatrace Organizer
Dynatrace Organizer

Hello,

How did you install the agent? Your installation is missing some required input parameters. Please follow the link below to install the agent as a docker container

https://www.dynatrace.com/support/help/setup-and-configuration/setup-on-container-platforms/docker/s...

emrepehlivan53
Newcomer_

Hello, 

I did it with standard installation on Kubernetes on Mac docker desktop. I used the commands below. Although the commands worked successfully, the oneagent pod does not running and gets the error below.

 

kubectl create namespace dynatrace
kubectl apply -f https://github.com/Dynatrace/dynatrace-operator/releases/download/v0.10.2/kubernetes.yaml
kubectl -n dynatrace wait pod --for=condition=ready --selector=app.kubernetes.io/name=dynatrace-operator,app.kubernetes.io/component=webhook --timeout=300s

kubectl apply -f dynakube.yaml

 

mb_ouazzani
Observer

Hello,

I got the same problem, but with this environment configuration: Kubernetes Rancher 1.23.6 under Linux RHEL 8.6.

All the installation process was fine until the PODs load: they go UP then DOWN quickly with error message "Back-off restarting failed container" at the end.

Any idea on how to resolve this issue, thanks.

Do a kubectl describe pod to get the details about the crash reason.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Jennyhz77
Newcomer_

I was getting the same error but on a cluster at Digital Ocean. When I described the pod: kubectl describe pod dynatrace-webhook-5c5446977-rrwnk It returned: 

Jennyhz77_0-1702056679690.png

So I gave
logs -f dynatrace-webhook-5c5446977-rrwnk

And I got the exact answer.

In my case this is happening because I am simulating the installation of two versions

Use the command kubectl logs -f podname

Maybe it will help you

 

Featured Posts