# Resolving common Kubernetes security concerns

**URL:** <https://community.dynatrace.com/t/resolving-common-kubernetes-security-concerns/49105>\
**Category:** Troubleshooting\
**Tags:** security, data-privacy-and-product-security, application-monitoring, oneagent, kubernetes, infrastructure-monitoring\
**Created:** [November 29, 2024, 8:07am UTC](https://community.dynatrace.com/t/resolving-common-kubernetes-security-concerns/49105 "2024-11-29T08:07:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefanie\_pachne](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/stefanie_pachne/32/34814_2.png) [@stefanie\_pachne](https://community.dynatrace.com/u/stefanie_pachne)\
**Post date:** [November 29, 2024, 8:07am UTC](https://community.dynatrace.com/t/resolving-common-kubernetes-security-concerns/49105/1 "2024-11-29T08:07:45Z")

</div>

# **Self Service Summary**

This article of type Full-Self-Service gives an overview about Kubernetes monitoring modes and helps with known false positive scan results for Dynatrace on Kubernetes.

| **Issues** | **Solution** | **Alternatives** |
| You'd like to understand the architecture of supported Kubernetes monitoring options.Your security team or scanner is reporting Kubernetes security control violations. | Check below [1] deployment methods including architecture diagrams and [2] security requirements. | [Report a security vulnerability](https://community.dynatrace.com/topic/195675)Start a chat with Dynatrace Customer Success for&nbsp;installation questions |

# [1] Monitoring modes

## Full Kubernetes Observability (recommended)

**Features:** Immediate insights into Kubernetes health (see Kubernetes Observability below) and out-of-the-box distributed tracing and analytics for workloads (see Application Observability below).

### Deployment options

- **Recommended:** &nbsp;[Deploy Dynatrace Operator in cloud native full stack mode](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/installation/cloud-native-fullstack)  
**Architecture:** &nbsp;[Cloud native full-stack injection](https://dt-cdn.net/images/screenshot-2024-01-31-at-2-40-02-pm-2352-4cba84df51.png)
- Other:&nbsp;[Deploy Dynatrace Operator in classic full stack mode](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/installation/classic-full-stack)  
**Limitation** : There’s a startup dependency between the container in which OneAgent is deployed and application containers to be instrumented (for example, containers that have deep process monitoring enabled). The OneAgent container must be started and the oneagenthelper process must be running before the application container is launched so that the application can be properly instrumented.
- **Deprecated:** &nbsp;[Manual OneAgent rollout via Daemonset](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/installation/other/oneagent-daemonset)&nbsp;(not based on Dynatrace Operator)

## Kubernetes Observability

**Features:** Understand and troubleshoot the health of your cluster including dashboards, root-causes analysis with DAVIS Causal AI, alerting, resource optimization, and log analytics.

### Deployment

[Deploy Dynatrace Operator for Kubernetes observability](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/installation/platform-observability)  
**Architecture:** &nbsp;[Kubernetes Platform Monitoring](https://dt-cdn.net/images/screenshot-2024-01-31-at-3-22-25-pm-2348-59be4489a6.png)

## Application Observability

**Features:** Automated distributed tracing and code-level visibility including memory, thread and process metrics, application logs, user sessions for web and mobile, vulnerability detection.

### Deployment options

- **Recommended:** &nbsp;[Deploy Dynatrace Operator in application monitoring mode](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/installation/app-observability-automated)  
**Architecture:** &nbsp;[Automatic injection](https://dt-cdn.net/images/screenshot-2024-01-31-at-3-23-56-pm-2358-6db693bc75.png)
- Other
  - Deployment:&nbsp;[Pod-runtime injection](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/installation/other/pod-runtime)  
Architecture:&nbsp;[Pod-runtime injection](https://dt-cdn.net/images/podruntime-891-f7ca7624de.png)
  - Deployment:&nbsp;[Build-time injection](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/installation/other/container-buildtime)  
Architecture:&nbsp;[Container build-time injection](https://dt-cdn.net/images/buildtimeinjection-891-1c5525cb55.png)

## Alternative

### Deploy OneAgent on Docker host

Alternatively, you can also deploy OneAgent on the Docker host on Linux. In this scenario, OneAgent does not run in a container but directly on the host, so there is no Linux namespace isolation. For more information, see&nbsp;[OneAgent on Linux](https://docs.dynatrace.com/docs/ingest-from/dynatrace-oneagent/installation-and-operation/linux).

**Architecture** :&nbsp;[Host monitoring](https://dt-cdn.net/images/image-20240612-113305-1637-c57403b85c.png)

# [2] Security controls

### Issue

Customer reported Kubernetes security control **violations** and vulnerabilities include:

- Running containers as root user should be avoided
- Least privileged Linux capabilities should be enforced for containers
- Immutable (read-only) root filesystem should be enforced for containers
- Kubernetes clusters should not grant CAPSYSADMIN security capabilities
- Containers should only use allowed AppArmor profiles
- Kubernetes clusters should disable automounting API credentials

### Solution

Dynatrace Full-Stack Monitoring for container platforms from the application down to the infrastructure layer requires elevated privileges to get container-level metrics and perform deep-code host monitoring, including OneAgent injection into processes. The above scan results can be considered as **false positives**.

Security requirements:

- Security controls implications to understand false positives:&nbsp;[Dynatrace Operator security — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/reference/security#cis-benchmark)
- Required permissions:&nbsp;[Dynatrace Operator security — Dynatrace Docs](https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/reference/security#permission-list)

However, if you don’t want to grant elevated privileges to OneAgent, or you don’t have access to the infrastructure layer, you can go with application-only monitoring.
