# Deployment seems successful, but the dynatrace-oneagent container isn't running

**URL:** <https://community.dynatrace.com/t/deployment-seems-successful-but-the-dynatrace-oneagent-container-isnt-running/42898>\
**Category:** Troubleshooting\
**Tags:** kubernetes\
**Created:** [December 21, 2023, 3:00pm UTC](https://community.dynatrace.com/t/deployment-seems-successful-but-the-dynatrace-oneagent-container-isnt-running/42898 "2023-12-21T15:00:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![darynakovyrina](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/darynakovyrina/32/30846_2.png) [@darynakovyrina](https://community.dynatrace.com/u/darynakovyrina)\
**Post date:** [December 21, 2023, 3:00pm UTC](https://community.dynatrace.com/t/deployment-seems-successful-but-the-dynatrace-oneagent-container-isnt-running/42898/1 "2023-12-21T15:00:00Z")

</div>

**DaemonSet**

Use the following command to process and apply the DaemonSet template.

```auto
oc process -f dynatrace-oneagent-template.yml ONEAGENT_INSTALLER_SCRIPT_URL="[oneagent-installer-script-url]" | oc apply -f -

```

After deployment, check if any pods are running.

```auto
oc get pods

```

```auto
> No resources found.

```

This is typically the case if the `dynatrace` service account hasn’t been configured to [run privileged pods](https://docs.dynatrace.com/docs/setup-and-configuration/setup-on-k8s/installation/other/oneagent-daemonset#install).

```auto
oc describe ds/dynatrace-oneagent

Name: dynatrace-oneagent
Image(s): dynatrace/oneagent
Selector: name=dynatrace-oneagent
Node-Selector:  
Labels: template=dynatrace-oneagent
Desired Number of Nodes Scheduled: 0
Current Number of Nodes Scheduled: 0
Number of Nodes Misscheduled: 0
Pods Status: 0 Running / 0 Waiting / 0 Succeeded / 0 Failed
Events:
FirstSeen LastSeen Count From SubObjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------------ -------
6m 3m 17 {daemon-set } Warning FailedCreate Error creating: pods "dynatrace-oneagent-" is forbidden: unable to validate against any security context constraint: [spec.securityContext.hostNetwork: Invalid value: true: Host network is not allowed to be used spec.securityContext.hostPID: Invalid value: true: Host PID is not allowed to be used spec.securityContext.hostIPC: Invalid value: true: Host IPC is not allowed to be used spec.containers[0].securityContext.privileged: Invalid value: true: Privileged containers are not allowed spec.containers[0].securityContext.volumes[0]: Invalid value: "hostPath": hostPath volumes are not allowed to be used spec.containers[0].securityContext.hostNetwork: Invalid value: true: Host network is not allowed to be used spec.containers[0].securityContext.hostPID: Invalid value: true: Host PID is not allowed to be used spec.containers[0].securityContext.hostIPC: Invalid value: true: Host IPC is not allowed to be used]

```

---

<div class="post-metadata">

**Author:** ![Sahil1999](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@Sahil1999](https://community.dynatrace.com/u/Sahil1999)\
**Post date:** [January 23, 2024, 8:42am UTC](https://community.dynatrace.com/t/deployment-seems-successful-but-the-dynatrace-oneagent-container-isnt-running/42898/2 "2024-01-23T08:42:23Z")

</div>

Anything for Kubernetes?
