# Using Dynatrace for monitoring Kubernetes

**URL:** <https://community.dynatrace.com/t/using-dynatrace-for-monitoring-kubernetes/38747>\
**Category:** Container platforms\
**Tags:** kubernetes, docker\
**Created:** [March 8, 2023, 6:39pm UTC](https://community.dynatrace.com/t/using-dynatrace-for-monitoring-kubernetes/38747 "2023-03-08T18:39:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![emrepehlivan53](https://avatars.discourse-cdn.com/v4/letter/e/e9a140/32.png) [@emrepehlivan53](https://community.dynatrace.com/u/emrepehlivan53)\
**Post date:** [March 8, 2023, 6:39pm UTC](https://community.dynatrace.com/t/using-dynatrace-for-monitoring-kubernetes/38747/1 "2023-03-08T18:39:50Z")

</div>

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 &nbsp; &nbsp; Reason &nbsp; &nbsp; Age &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; From &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Message

---- &nbsp; &nbsp; ------ &nbsp; &nbsp; ----&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ---- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -------

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

Normal &nbsp; Pulled &nbsp; &nbsp; 13m &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; kubelet&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Successfully pulled image “[beu62464.live.dynatrace.com/linux/oneagent:latest](http://beu62464.live.dynatrace.com/linux/oneagent:latest)” in 588.343042ms

Normal &nbsp; Pulled &nbsp; &nbsp; 13m &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; kubelet&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Successfully pulled image “[beu62464.live.dynatrace.com/linux/oneagent:latest](http://beu62464.live.dynatrace.com/linux/oneagent:latest)” in 642.174709ms

Normal &nbsp; Pulled &nbsp; &nbsp; 13m &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; kubelet&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Successfully pulled image “[beu62464.live.dynatrace.com/linux/oneagent:latest](http://beu62464.live.dynatrace.com/linux/oneagent:latest)” in 629.661083ms

Normal &nbsp; Pulled &nbsp; &nbsp; 13m &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; kubelet&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Successfully pulled image “[beu62464.live.dynatrace.com/linux/oneagent:latest](http://beu62464.live.dynatrace.com/linux/oneagent:latest)” in 659.203876ms

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

Normal &nbsp; Pulling&nbsp; &nbsp; 12m (x5 over 13m) &nbsp; &nbsp; kubelet&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Pulling image “[beu62464.live.dynatrace.com/linux/oneagent:latest](http://beu62464.live.dynatrace.com/linux/oneagent:latest)”

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

Normal &nbsp; Pulled &nbsp; &nbsp; 12m &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; kubelet&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Successfully pulled image “[beu62464.live.dynatrace.com/linux/oneagent:latest](http://beu62464.live.dynatrace.com/linux/oneagent:latest)” in 646.161876ms

Warning&nbsp; BackOff&nbsp; &nbsp; 3m48s (x45 over 13m)&nbsp; kubelet&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 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: [Set up Dynatrace OneAgent as a Docker container — Dynatrace Docs](https://www.dynatrace.com/support/help/shortlink/oneagent-docker)

18:34:23 Error: Initialization procedure failed

---

<div class="post-metadata">

**Author:** ![shahinm](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@shahinm](https://community.dynatrace.com/u/shahinm)\
**Post date:** [March 9, 2023, 9:59am UTC](https://community.dynatrace.com/t/using-dynatrace-for-monitoring-kubernetes/38747/2 "2023-03-09T09:59:15Z")

</div>

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

> **[Set up Dynatrace OneAgent as a Docker container](https://docs.dynatrace.com/docs/ingest-from/setup-on-container-platforms/docker/set-up-dynatrace-oneagent-as-docker-container)**
>
> Install and update Dynatrace OneAgent as a Docker container.

---

<div class="post-metadata">

**Author:** ![emrepehlivan53](https://avatars.discourse-cdn.com/v4/letter/e/e9a140/32.png) [@emrepehlivan53](https://community.dynatrace.com/u/emrepehlivan53)\
**Post date:** [March 9, 2023, 3:13pm UTC](https://community.dynatrace.com/t/using-dynatrace-for-monitoring-kubernetes/38747/3 "2023-03-09T15:13:40Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![mb\_ouazzani](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@mb\_ouazzani](https://community.dynatrace.com/u/mb_ouazzani)\
**Post date:** [June 13, 2023, 5:14pm UTC](https://community.dynatrace.com/t/using-dynatrace-for-monitoring-kubernetes/38747/4 "2023-06-13T17:14:41Z")

</div>

Hello,

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

All the installation process was fine until the&nbsp;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.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [June 13, 2023, 8:14pm UTC](https://community.dynatrace.com/t/using-dynatrace-for-monitoring-kubernetes/38747/5 "2023-06-13T20:14:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jennyhz77](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@Jennyhz77](https://community.dynatrace.com/u/Jennyhz77)\
**Post date:** [December 8, 2023, 5:33pm UTC](https://community.dynatrace.com/t/using-dynatrace-for-monitoring-kubernetes/38747/6 "2023-12-08T17:33:32Z")

</div>

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](https://global.discourse-cdn.com/dynatrace/original/3X/8/c/8c1e09ac0719ace869a71089925eccfa296dac93.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
