# Oneagent Container Deployment to GKE Fails (Container CrashLoop)

**URL:** <https://community.dynatrace.com/t/oneagent-container-deployment-to-gke-fails-container-crashloop/7171>\
**Category:** Container platforms\
**Tags:** oneagent, docker\
**Created:** [July 23, 2017, 10:41am UTC](https://community.dynatrace.com/t/oneagent-container-deployment-to-gke-fails-container-crashloop/7171 "2017-07-23T10:41:07Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![traiano](https://avatars.discourse-cdn.com/v4/letter/t/d07c76/32.png) [@traiano](https://community.dynatrace.com/u/traiano)\
**Post date:** [July 23, 2017, 10:41am UTC](https://community.dynatrace.com/t/oneagent-container-deployment-to-gke-fails-container-crashloop/7171/1 "2017-07-23T10:41:07Z")

</div>

Hi,

We’re doing a PoC to determine if dynatrace can be used to monitor our containerized applications running on Google’s GKE (kubernetes) platform.

However, your process described below for getting dynatrace oneagent to work on GKE does not work:  
[https://help.dynatrace.com/infrastructure-monitori…](https://help.dynatrace.com/infrastructure-monitoring/containers/how-do-i-run-oneagent-with-kubernetes/)

Following this procedure, the container fails to deploy with this error in the console:

```auto
"Error syncing pod, skipping: failed to "StartContainer" for "dynatrace-oneagent" with CrashLoopBackOff: "Back-off 2m40s restarting failed container=dynatrace-oneagent pod=dynatrace-oneagent-nqf6q_default(500a76c4-6f83-11e7-902a-42010a840026)"

```

Investigating further, the container logs have just this line in before crashing:

```auto
10:29:53 This script can be only executed when Dynatrace OneAgent is deployed as docker container

```

(kubectl logs dynatrace-oneagent-mjr9v --previous)

Is this a defect in the oneagent container image itself, installation process or something unrelated?

Please help me troubleshoot this container failure further?

Many thanks in advance!

Traiano

---

<div class="post-metadata">

**Author:** ![daniela\_rabiser](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/daniela_rabiser/32/21788_2.png) [@daniela\_rabiser](https://community.dynatrace.com/u/daniela_rabiser)\
**Post date:** [July 24, 2017, 7:16am UTC](https://community.dynatrace.com/t/oneagent-container-deployment-to-gke-fails-container-crashloop/7171/2 "2017-07-24T07:16:33Z")

</div>

Hi Traiano,

since your goal is to deploy Dynatrace OneAgent on Google’s GKE platform, you may want to follow the instructions described here: [https://help.dynatrace.com/infrastructure-monitoring/containers/how-do-i-deploy-oneagent-in-gke-based-clusters/](https://help.dynatrace.com/infrastructure-monitoring/containers/how-do-i-deploy-oneagent-in-gke-based-clusters/)

Hope this helps.

Best,  
Daniela

---

<div class="post-metadata">

**Author:** ![traiano](https://avatars.discourse-cdn.com/v4/letter/t/d07c76/32.png) [@traiano](https://community.dynatrace.com/u/traiano)\
**Post date:** [July 24, 2017, 7:31am UTC](https://community.dynatrace.com/t/oneagent-container-deployment-to-gke-fails-container-crashloop/7171/3 "2017-07-24T07:31:57Z")

</div>

Hi Daniela

Firstly, thanks for your response. However, the link you posted is of no use because:

1) This link only describes how to set up the GKE container cluster  
infrastructure - it actually tells you nothing about how to deploy the  
the dynatrace oneagent container itself. For that, you have to refer to  
this link, which I had to find by myself:

[https://help.dynatrace.com/infrastructure-monitori…](https://help.dynatrace.com/infrastructure-monitoring/containers/how-do-i-run-oneagent-with-kubernetes/?_ga=2.263132940.1436082442.1500792328-55233876.1500676849)

2) I have already set up a GKE container cluster - this is my existing system. I have also followed this link as a separate test and it is fine, but:

The problem is that even once I’ve deployed the oneagent container to GKE, the oneagent container crashes with the error I described in my original post.

So the solution I need is:

a) To fix the root cause of why the oneagent container is crashing on GKE.

b) optionally: how to troubleshoot further to discover the reason why the oneagent container is crashing on GKE.

I’d be really thankful if you could help me with this. So far it appears that Dynatrace offers a solution to APM on GKE , but in practice we are not able to get this to work.

---

<div class="post-metadata">

**Author:** ![daniela\_rabiser](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/daniela_rabiser/32/21788_2.png) [@daniela\_rabiser](https://community.dynatrace.com/u/daniela_rabiser)\
**Post date:** [July 24, 2017, 7:44am UTC](https://community.dynatrace.com/t/oneagent-container-deployment-to-gke-fails-container-crashloop/7171/4 "2017-07-24T07:44:11Z")

</div>

Hi Traiano,

sorry that the help topic around deploying OneAgent in GKE-based clusters is not helpful to you. I’ve asked one of our Docker experts to have a look at your problem description. Please stay tuned for further answers.

Best,  
Daniela

---

<div class="post-metadata">

**Author:** ![traiano](https://avatars.discourse-cdn.com/v4/letter/t/d07c76/32.png) [@traiano](https://community.dynatrace.com/u/traiano)\
**Post date:** [July 24, 2017, 7:47am UTC](https://community.dynatrace.com/t/oneagent-container-deployment-to-gke-fails-container-crashloop/7171/5 "2017-07-24T07:47:40Z")

</div>

Thanks, Daniela! I await in anticipation …

---

<div class="post-metadata">

**Author:** ![Tomasz\_Gajger](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/tomasz_gajger/32/11712_2.png) [@Tomasz\_Gajger](https://community.dynatrace.com/u/Tomasz_Gajger)\
**Post date:** [July 24, 2017, 9:14am UTC](https://community.dynatrace.com/t/oneagent-container-deployment-to-gke-fails-container-crashloop/7171/6 "2017-07-24T09:14:06Z")

</div>

Hi Traiano,

I assume that you have tried to deploy the latest image from Docker Hub, which is currently version 1.119. We had a problem with this version that causes it to not be able to recognize docker used by kubernetes correctly, the problem was fixed in version 1.121, that should be made available on Docker Hub in a matter of few days.  
Furthermore, please be aware that currently we only support _container-vm_ type of node image and deployment will not work with _cos_ type.

Regards,  
Tomek

---

<div class="post-metadata">

**Author:** ![traiano](https://avatars.discourse-cdn.com/v4/letter/t/d07c76/32.png) [@traiano](https://community.dynatrace.com/u/traiano)\
**Post date:** [July 24, 2017, 9:30am UTC](https://community.dynatrace.com/t/oneagent-container-deployment-to-gke-fails-container-crashloop/7171/7 "2017-07-24T09:30:16Z")

</div>

Hi Tomasz

I’ve converted the GKE cluster to use container-vm.

We are using the “latest” oneagent image available. So if the current image is not 1.121, then I assume it’s one of the defective images?

So, to conclude, would this mean we have to wait some days to complete our evaluation of Dynatrace as an APM for GKE? Any date for when we can evaluate 1.121?

Thanks in advance!

Traiano

---

<div class="post-metadata">

**Author:** ![Tomasz\_Gajger](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/tomasz_gajger/32/11712_2.png) [@Tomasz\_Gajger](https://community.dynatrace.com/u/Tomasz_Gajger)\
**Post date:** [July 25, 2017, 5:29am UTC](https://community.dynatrace.com/t/oneagent-container-deployment-to-gke-fails-container-crashloop/7171/8 "2017-07-25T05:29:06Z")

</div>

Hi Traiano,

yes, the previous latest image (version 1.119) was defective.  
However, version 1.121 was just released to Docker Hub and tagged as latest, this one should work with your GKE setup.

Regards,  
Tomek

---

<div class="post-metadata">

**Author:** ![traiano](https://avatars.discourse-cdn.com/v4/letter/t/d07c76/32.png) [@traiano](https://community.dynatrace.com/u/traiano)\
**Post date:** [July 25, 2017, 7:13am UTC](https://community.dynatrace.com/t/oneagent-container-deployment-to-gke-fails-container-crashloop/7171/9 "2017-07-25T07:13:05Z")

</div>

Hi Tomasz, thanks for your response.

However, I see the container (latest) still appears to have issues, the containers fail to startup due to a permissions issue in mounting the installation directory. Here is the container logs from kubernetes when deploying with “latest”:

bash-3.2$ kubectl logs dynatrace-oneagent-2q2jv

```auto
/tmp/entrypoint.sh: line 352: can't create /mnt/root//opt/dynatrace/oneagent/log/installer/installation_docker_26567.log: nonexistent directory

```

```auto
/tmp/entrypoint.sh: line 352: can't create /mnt/root//opt/dynatrace/oneagent/log/installer/installation_docker_26567.log: nonexistent directory

```

```auto
mkdir: can't create directory '/mnt/root//opt/dynatrace/': Read-only file system

```

```auto
07:07:47 Cannot create /mnt/root//opt/dynatrace/oneagent directory.

```

```auto
chmod: /mnt/root//opt/dynatrace/oneagent: No such file or directory

```

```auto
07:07:47 Cannot change permisions of /mnt/root//opt/dynatrace/oneagent directory to 755.

```

```auto
mkdir: can't create directory '/mnt/root//opt/dynatrace/': Read-only file system

```

```auto
07:07:47 Cannot create /mnt/root//opt/dynatrace/oneagent/log directory.

```

```auto
chmod: /mnt/root//opt/dynatrace/oneagent/log: No such file or directory

```

```auto
07:07:47 Cannot change permisions of /mnt/root//opt/dynatrace/oneagent/log directory to 777.

```

```auto
mkdir: can't create directory '/mnt/root//opt/dynatrace/': Read-only file system

```

```auto
07:07:47 Cannot create /mnt/root//opt/dynatrace/oneagent/log/installer directory.

```

```auto
chmod: /mnt/root//opt/dynatrace/oneagent/log/installer: No such file or directory

```

```auto
07:07:47 Cannot change permisions of /mnt/root//opt/dynatrace/oneagent/log/installer directory to 755.

```

```auto
mkdir: can't create directory '/mnt/root//opt/dynatrace/': Read-only file system

```

```auto
07:07:47 Cannot create /mnt/root//opt/dynatrace/oneagent/log/network directory.

```

```auto
chmod: /mnt/root//opt/dynatrace/oneagent/log/network: No such file or directory

```

```auto
07:07:47 Cannot change permisions of /mnt/root//opt/dynatrace/oneagent/log/network directory to 755.

```

```auto
07:07:47 Started agent deployment as docker image, PID 26567.

```

```auto
/tmp/entrypoint.sh: line 352: can't create /mnt/root//opt/dynatrace/oneagent/log/installer/installation_docker_26567.log: nonexistent directory

```

```auto
/tmp/entrypoint.sh: line 352: can't create /mnt/root//opt/dynatrace/oneagent/log/installer/installation_docker_26567.log: nonexistent directory

```

```auto
/tmp/entrypoint.sh: line 352: can't create /mnt/root//opt/dynatrace/oneagent/log/installer/installation_docker_26567.log: nonexistent directory

```

```auto
07:07:47 Container version: 1.121.196.20170720-130455

```

```auto
/tmp/entrypoint.sh: line 352: can't create /mnt/root//opt/dynatrace/oneagent/log/installer/installation_docker_26567.log: nonexistent directory

```

```auto
/tmp/entrypoint.sh: line 352: can't create /mnt/root//opt/dynatrace/oneagent/log/installer/installation_docker_26567.log: nonexistent directory

```

```auto
/tmp/entrypoint.sh: line 352: can't create /mnt/root//opt/dynatrace/oneagent/log/installer/installation_docker_26567.log: nonexistent directory

```

```auto
/tmp/entrypoint.sh: line 352: can't create /mnt/root//opt/dynatrace/oneagent/log/installer/installation_docker_26567.log: nonexistent directory

```

```auto
07:07:48 Deploying to: /mnt/root

```

```auto
/tmp/entrypoint.sh: line 352: can't create /mnt/root//opt/dynatrace/oneagent/log/installer/installation_docker_26567.log: nonexistent directory

```

```auto
mkdir: can't create directory '/mnt/root//opt/dynatrace/': Read-only file system

```

```auto
07:07:48 Cannot create /mnt/root//opt/dynatrace/oneagent directory.

```

```auto
chmod: /mnt/root//opt/dynatrace/oneagent: No such file or directory

```

```auto
07:07:48 Cannot change permisions of /mnt/root//opt/dynatrace/oneagent directory to 755.

```

```auto
/tmp/entrypoint.sh: line 352: can't create /mnt/root//opt/dynatrace/oneagent/log/installer/installation_docker_26567.log: nonexistent directory

```

```auto
cp: can't create '/mnt/root//opt/dynatrace/oneagent/Dynatrace-OneAgent-Linux.sh': No such file or directory

```

```auto
/tmp/entrypoint.sh: line 352: can't create /mnt/root//opt/dynatrace/oneagent/log/installer/installation_docker_26567.log: nonexistent directory

```

```auto
/tmp/entrypoint.sh: line 352: can't create /mnt/root//opt/dynatrace/oneagent/log/installer/installation_docker_26567.log: nonexistent directory

```

```auto
/tmp/entrypoint.sh: line 352: can't create /mnt/root//opt/dynatrace/oneagent/log/installer/installation_docker_26567.log: nonexistent directory

```

Here is my deployment .yaml:

```auto
apiVersion: extensions/v1beta1kind: DaemonSetmetadata: name: dynatrace-oneagentspec: template: metadata: labels: run: dynatrace-oneagent spec: hostPID: true hostIPC: true hostNetwork: true volumes: - name: host-root hostPath: path: / containers: - name: dynatrace-oneagent image: dynatrace/oneagent:latest args: - "TENANT=lfn20468" - "TENANT_TOKEN=IRV1c15bIcRWq5KQ" - "SERVER=https://lfn20468.live.dynatrace.com" volumeMounts: - mountPath: /mnt/root name: host-root securityContext: privileged: true

```

Snapshot of status of the daemonset:

bash-3.2$ kubectl get daemonsets  
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE-SELECTOR AGE  
dynatrace-oneagent 3 3 0 3 0 \<none\> 5m  
bash-3.2$  
bash-3.2$

bash-3.2$  
bash-3.2$ kubectl get pods  
NAME READY STATUS RESTARTS AGE  
dynatrace-oneagent-2q2jv 0/1 CrashLoopBackOff 5 5m  
dynatrace-oneagent-5mqv1 0/1 CrashLoopBackOff 5 5m  
dynatrace-oneagent-6vvtf 0/1 CrashLoopBackOff 5 5m

---

<div class="post-metadata">

**Author:** ![Tomasz\_Gajger](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/tomasz_gajger/32/11712_2.png) [@Tomasz\_Gajger](https://community.dynatrace.com/u/Tomasz_Gajger)\
**Post date:** [July 25, 2017, 11:34am UTC](https://community.dynatrace.com/t/oneagent-container-deployment-to-gke-fails-container-crashloop/7171/10 "2017-07-25T11:34:13Z")

</div>

Hi Traiano,

are you sure that this node uses _container-vm_ image?  
I recall seeing similar errors when _cos_ was used.

---

<div class="post-metadata">

**Author:** ![traiano](https://avatars.discourse-cdn.com/v4/letter/t/d07c76/32.png) [@traiano](https://community.dynatrace.com/u/traiano)\
**Post date:** [July 25, 2017, 12:35pm UTC](https://community.dynatrace.com/t/oneagent-container-deployment-to-gke-fails-container-crashloop/7171/11 "2017-07-25T12:35:50Z")

</div>

Hi Tomasz! Thanks, that was it, it looks like my cos-\>container-vm conversion didn’t complete successfully last time, so I did it again. We have success 🙂

---

<div class="post-metadata">

**Author:** ![scott\_brenner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/scott_brenner/32/9216_2.png) [@scott\_brenner](https://community.dynatrace.com/u/scott_brenner)\
**Post date:** [October 10, 2017, 6:12pm UTC](https://community.dynatrace.com/t/oneagent-container-deployment-to-gke-fails-container-crashloop/7171/12 "2017-10-10T18:12:44Z")

</div>

Having the same issue, what was the resolution?

---

<div class="post-metadata">

**Author:** ![Tomasz\_Gajger](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/tomasz_gajger/32/11712_2.png) [@Tomasz\_Gajger](https://community.dynatrace.com/u/Tomasz_Gajger)\
**Post date:** [October 12, 2017, 8:44am UTC](https://community.dynatrace.com/t/oneagent-container-deployment-to-gke-fails-container-crashloop/7171/13 "2017-10-12T08:44:30Z")

</div>

Hi Scott,

such a problem can occur as a result of different root causes.  
Please make sure that you followed the instructions from

[Monitor Google Kubernetes Engine (GKE) — Dynatrace Docs](https://help.dynatrace.com/infrastructure/containers/how-do-i-deploy-oneagent-in-gke-based-clusters/) (this page was recently updated).

If the problem still persists, please kindly open a support ticket on

> **[Dynatrace Customer Success and Support](https://www.dynatrace.com/services-support/dynatrace-one/)**
>
> Combine proactive customer guidance and support, technical account management, and proven expertise to drive end-to-end adoption of the Dynatrace Platform.

Regards,  
Tomek

---

<div class="post-metadata">

**Author:** ![larry\_roberts](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/larry_roberts/32/7131_2.png) [@larry\_roberts](https://community.dynatrace.com/u/larry_roberts)\
**Post date:** [May 1, 2018, 8:38pm UTC](https://community.dynatrace.com/t/oneagent-container-deployment-to-gke-fails-container-crashloop/7171/14 "2018-05-01T20:38:38Z")

</div>

> **Answer** by **Tomasz G.** Jul 24, 2017 at 09:14 AM
> 
> Hi Traiano,
> 
> I assume that you have tried to deploy the latest image from Docker Hub, which is currently version 1.119. We had a problem with this version that causes it to not be able to recognize docker used by kubernetes correctly, the problem was fixed in version 1.121, that should be made available on Docker Hub in a matter of few days.  
> Furthermore, please be aware that currently we only support _container-vm_ type of node image and deployment will not work with _cos_ type.
> 
> Regards,  
> Tomek

Where is Dynatrace now with supporting the cos type? We are doing some evaluations and this is a requirement. Thanks!

---

<div class="post-metadata">

**Author:** ![Tomasz\_Gajger](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/tomasz_gajger/32/11712_2.png) [@Tomasz\_Gajger](https://community.dynatrace.com/u/Tomasz_Gajger)\
**Post date:** [June 1, 2018, 4:38am UTC](https://community.dynatrace.com/t/oneagent-container-deployment-to-gke-fails-container-crashloop/7171/15 "2018-06-01T04:38:03Z")

</div>

We’re actively working on COS support, it should soon be released as an EAP feature.
