# OneAgent in Minikube failing to deploy

**URL:** <https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221>\
**Category:** Container platforms\
**Tags:** oneagent, kubernetes\
**Created:** [August 13, 2022, 12:59am UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221 "2022-08-13T00:59:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomLichti](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@TomLichti](https://community.dynatrace.com/u/TomLichti)\
**Post date:** [August 13, 2022, 12:59am UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/1 "2022-08-13T00:59:19Z")

</div>

I am trying to work through the DTU Kubernetes lab, and I am stuck on what feels like the last step. The OneAgent pod will not start, the log is ending with the following:

00:49:55 Started with user: uid=0(root) gid=0(root) groups=0(root)  
00:49:55 Error: Container was not launched in host’s cgroup namespace  
00:49:55 Error: Dynatrace OneAgent requires parameters: --pid, --net and --cgroupns set to ‘host’.  
00:49:55 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)  
00:49:55 Error: Initialization procedure failed

I have googled every error message, combed through yaml files, and I have not been able to figure out if this is the real issue, or something else? I’ve tried adding the ‘useUnprivilegedMode: true’ setting in the dynakube.yaml, but it didn’t make a difference. I’m fairly new to deploying Dynatrace in K8S, not new to Dynatrace though, this one has me stumped!

Thanks for any help.

Tom

---

<div class="post-metadata">

**Author:** ![andre\_f](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/andre_f/32/29172_2.png) [@andre\_f](https://community.dynatrace.com/u/andre_f)\
**Post date:** [August 15, 2022, 9:57am UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/2 "2022-08-15T09:57:48Z")

</div>

Hi&nbsp;[@TomLichti](https://community.dynatrace.com/user/54091),

Can you give some more information?  
E.g. link to the lab or did you use a Dynatrace guide for deployment? If yes, which one? For example, have you used this guide for [Kubernetes classicFullStack](https://www.dynatrace.com/support/help/shortlink/full-stack-dto-k8#manual)? Did you use manual or automatic or helm for deployment?

---

<div class="post-metadata">

**Author:** ![TomLichti](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@TomLichti](https://community.dynatrace.com/u/TomLichti)\
**Post date:** [August 15, 2022, 12:23pm UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/3 "2022-08-15T12:23:04Z")

</div>

Hi&nbsp;[@andre\_f](https://community.dynatrace.com/user/34598),

I used the automated Dynatrace Operator guide here:&nbsp;[Get started with Kubernetes/OpenShift monitoring | Dynatrace Docs](https://www.dynatrace.com/support/help/setup-and-configuration/setup-on-container-platforms/kubernetes/get-started-with-kubernetes-monitoring#automated)

The lab I am working on is this one:&nbsp;[Loading](https://university.dynatrace.com/assets/23274/LabKubernetes.pdf)

I created another full Kubernetes cluster on another completely separate server, and had the exact same problem and error. On the new cluster, before I installed K8S, I had a docker instance, oneagent and activegate installed outside docker and it worked perfectly. I removed oneagent, activegate and docker completely, and started with K8S from scratch, and had the same problem.

As a test I installed the onegent again outside the cluster and that seems to work.

---

<div class="post-metadata">

**Author:** ![andre\_f](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/andre_f/32/29172_2.png) [@andre\_f](https://community.dynatrace.com/u/andre_f)\
**Post date:** [August 15, 2022, 7:26pm UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/4 "2022-08-15T19:26:36Z")

</div>

Hi [@TomLichti](https://community.dynatrace.com/user/54091),  
I tried to reproduce it, but didn’t have these problems. The OneAgent pod was able to start.  
My setup looks like this:

1. created VM with multipass

2. minikube installed

3. docker installed

4. started Minikube

5. created yaml for the application and run apply command

6. in the Dynatrace menu in the area Manage  
Deploy Dynatrace \> Start Installation \> click here Kubernetes

7. enter a name, create Dynatrace operator token (see screenshot - (1) )

8. download dynakube.yaml and copy file to minikube VM or copy content to a file dynakube.yaml on the vm

9. I copied the commands in the window (see screenshot - (2) ) individually and executed them one after the other

10. Wait until pods Operator, ActiveGate and OneAgent(s) are running  
“kubectl get all -n dynatrace” or “minikube kubectl -- get all -n dynatrace” should show this

It was a new VM only minikube and docker were installed according to instructions.

Is it possible that you have also executed steps from this [documentation](https://www.dynatrace.com/support/help/shortlink/oneagent-docker)?

---

<div class="post-metadata">

**Author:** ![TomLichti](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@TomLichti](https://community.dynatrace.com/u/TomLichti)\
**Post date:** [August 15, 2022, 8:01pm UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/5 "2022-08-15T20:01:58Z")

</div>

I followed the exact same steps that you did. The only difference, and this may be the root cause, is that on the new server I had previously installed Docker (not Kubernetes), and standalone (not containerized) ActiveGate and OneAgent. I thought I had removed all of those components and started fresh, but it was still on the same server. Having said that, my first attempt was on a VirtualBox VM that I don’t think had anything other than a K8S deployment, but I will start that from scratch with a new VM and see how it goes.

Thank you for investigating!

---

<div class="post-metadata">

**Author:** ![techean](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/techean/32/227_2.png) [@techean](https://community.dynatrace.com/u/techean)\
**Post date:** [August 16, 2022, 5:01am UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/6 "2022-08-16T05:01:52Z")

</div>

Tom just to confirm and also&nbsp;[@andre\_f](https://community.dynatrace.com/user/34598)&nbsp;,

What are the underline OS being used in your VMs? is it open source Linux or red hat linux

---

<div class="post-metadata">

**Author:** ![andre\_f](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/andre_f/32/29172_2.png) [@andre\_f](https://community.dynatrace.com/u/andre_f)\
**Post date:** [August 16, 2022, 5:43am UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/7 "2022-08-16T05:43:21Z")

</div>

[@TomLichti](https://community.dynatrace.com/user/54091)&nbsp;Yes, you are probably right and it is related to one of the previously installed components that some of it was not completely uninstalled. Difficult to say. Hope the attempt with a new VM will work.

[@techean](https://community.dynatrace.com/user/49581)&nbsp;I used ubuntu 20.04

---

<div class="post-metadata">

**Author:** ![techean](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/techean/32/227_2.png) [@techean](https://community.dynatrace.com/u/techean)\
**Post date:** [August 16, 2022, 6:17am UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/8 "2022-08-16T06:17:01Z")

</div>

Should work !😉

---

<div class="post-metadata">

**Author:** ![TomLichti](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@TomLichti](https://community.dynatrace.com/u/TomLichti)\
**Post date:** [August 16, 2022, 11:41am UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/9 "2022-08-16T11:41:50Z")

</div>

Both of my tests were Ubuntu, the first 20.04 LTS and the second 22.04 LTS.

---

<div class="post-metadata">

**Author:** ![TomLichti](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@TomLichti](https://community.dynatrace.com/u/TomLichti)\
**Post date:** [August 17, 2022, 2:20pm UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/10 "2022-08-17T14:20:49Z")

</div>

I just re-did the whole thing from scratch and I get the same error again:

 ![TomLichti_0-1660745909235.png](https://global.discourse-cdn.com/dynatrace/original/3X/9/3/937de0d7f7fe7b05682a7dedec2864d4d4ef106d.png)

 ![TomLichti_1-1660745944874.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/1/51c89e6e61b1f9f10c1ecccc8101e45cadf59297.png)

The only difference I can see is that I used Ubuntu 22.04. I guess the last thing to try would be to use 20.04 as that is literally the only thing that is different. I would appreciate if anyone else who has used Ubuntu 22.04 and Dynatrace K8S via the Operator would chime in to see if it’s just me.

---

<div class="post-metadata">

**Author:** ![TomLichti](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@TomLichti](https://community.dynatrace.com/u/TomLichti)\
**Post date:** [August 17, 2022, 4:05pm UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/11 "2022-08-17T16:05:46Z")

</div>

I built a new VM on Ubunto server 20.04 with microk8s and it works. So it seems like there is something either with 22.04 or 22.04 Desktop that it didn’t like.

Thanks everyone!

---

<div class="post-metadata">

**Author:** ![techean](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/techean/32/227_2.png) [@techean](https://community.dynatrace.com/u/techean)\
**Post date:** [August 18, 2022, 5:24am UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/12 "2022-08-18T05:24:22Z")

</div>

Yes&nbsp;[@TomLichti](https://community.dynatrace.com/user/54091)&nbsp;.

I believe we can report this to support to fix it. Not working for my Vm too on 22.04.

---

<div class="post-metadata">

**Author:** ![andre\_f](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/andre_f/32/29172_2.png) [@andre\_f](https://community.dynatrace.com/u/andre_f)\
**Post date:** [August 18, 2022, 7:30am UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/13 "2022-08-18T07:30:49Z")

</div>

Hi&nbsp;[@TomLichti](https://community.dynatrace.com/user/54091),&nbsp;[@techean](https://community.dynatrace.com/user/49581)

I also tried it with Ubuntu 22.04. It works. My ActiveGate doesn’t run because I do not have enough CPU 😇. But the agent works. However, I am surprised that the agent shows me Ubuntu 20.04 as OS, but it was set up in VM 22.04.

 ![andre_f_0-1660807710689.png](https://global.discourse-cdn.com/dynatrace/original/2X/a/a704c68a5e12d5d1041dc25a2737895c34f89a0e.png)

 ![andre_f_1-1660807730504.png](https://global.discourse-cdn.com/dynatrace/original/3X/7/a/7a4ca7a0ae9463366db18d59527245cdca3ac037.png)

I don’t know what the difference is to your attempts. But as I said, the detection of the OS also makes me wonder 🤔.

---

<div class="post-metadata">

**Author:** ![TomLichti](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@TomLichti](https://community.dynatrace.com/u/TomLichti)\
**Post date:** [August 18, 2022, 11:41am UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/14 "2022-08-18T11:41:05Z")

</div>

That is very strange. Did you use Ubuntu Desktop or Server? I was using 22.04 Desktop and it failed every time. I used 20.04 Server and it worked. If I get time I’ll try 22.04 Server.

---

<div class="post-metadata">

**Author:** ![avdveen](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@avdveen](https://community.dynatrace.com/u/avdveen)\
**Post date:** [August 18, 2022, 12:45pm UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/15 "2022-08-18T12:45:24Z")

</div>

[@andre\_f](https://community.dynatrace.com/user/34598)&nbsp;I followed the exact same steps, but for some reason, my AG pod doesn’t get created/doesn’t start up - any idea why that would be? I’ve tried it using EC2 instances as well as local VMs. Do I need to change anything in the dynakube.yaml file, or use it as is from the deployment screen?

---

<div class="post-metadata">

**Author:** ![andre\_f](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/andre_f/32/29172_2.png) [@andre\_f](https://community.dynatrace.com/u/andre_f)\
**Post date:** [August 18, 2022, 1:04pm UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/16 "2022-08-18T13:04:44Z")

</div>

I used the default dynakube.yaml&nbsp;file and didn’t customize anything. Did you try a “describe” to see what the problem might be?

```markup
kubectl describe pod/<AG-POD-NAME> -n dynatrace

```

---

<div class="post-metadata">

**Author:** ![andre\_f](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/andre_f/32/29172_2.png) [@andre\_f](https://community.dynatrace.com/u/andre_f)\
**Post date:** [August 18, 2022, 1:05pm UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/17 "2022-08-18T13:05:07Z")

</div>

I used the Desktop version

---

<div class="post-metadata">

**Author:** ![avdveen](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@avdveen](https://community.dynatrace.com/u/avdveen)\
**Post date:** [August 18, 2022, 2:20pm UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/18 "2022-08-18T14:20:59Z")

</div>

If I run “kubectl get all -n dynatrace” the AG pod doesn’t show up at all, so “describe” won’t work, as I need the pod name, right?

---

<div class="post-metadata">

**Author:** ![andre\_f](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/andre_f/32/29172_2.png) [@andre\_f](https://community.dynatrace.com/u/andre_f)\
**Post date:** [August 18, 2022, 2:31pm UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/19 "2022-08-18T14:31:35Z")

</div>

Ah okay. Sorry about that. I thought that the pod was there but would not come into the status “running”.  
If you download the dynakube.yaml here (see screenshot), you should not need to adjust anything.

 ![andre_f_0-1660833042096.png](https://global.discourse-cdn.com/dynatrace/original/3X/3/5/352d592549ca643f05ef2bfc01d8e5322c5a1d0c.png)

This part is already included there (I have removed some comments here):

```markup
# Configuration for ActiveGate instances.
  activeGate:
    # Enables listed ActiveGate capabilities
    capabilities:
      - routing
      - kubernetes-monitoring

    resources:
      requests:
        cpu: 500m
        memory: 512Mi
      limits:
        cpu: 1000m
        memory: 1.5Gi

```

---

<div class="post-metadata">

**Author:** ![andre\_f](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/andre_f/32/29172_2.png) [@andre\_f](https://community.dynatrace.com/u/andre_f)\
**Post date:** [August 18, 2022, 2:37pm UTC](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221/20 "2022-08-18T14:37:13Z")

</div>

[@TomLichti](https://community.dynatrace.com/user/54091)&nbsp;After restarting the VM, I have the error as well.

```markup
14:11:41 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
14:11:41 Started with user: uid=0(root) gid=0(root) groups=0(root)
14:11:41 Error: Container was not launched in host's cgroup namespace
14:11:41 Error: Dynatrace OneAgent requires parameters: --pid, --net and --cgroupns set to 'host'.
14:11:41 If you are not sure how to launch the container please visit: https://www.dynatrace.com/support/help/shortlink/oneagent-docker
14:11:41 Error: Initialization procedure failed

```

Until now I had always started with a new VM and reinstalled everything. The error did not occur. After a reboot now it does.

[Next page](https://community.dynatrace.com/t/oneagent-in-minikube-failing-to-deploy/36221.md?page=2)
