# APM with container not working

**URL:** <https://discuss.elastic.co/t/apm-with-container-not-working/324419>\
**Category:** APM\
**Tags:** docker, rum\
**Created:** [February 1, 2023, 11:50am UTC](https://discuss.elastic.co/t/apm-with-container-not-working/324419 "2023-02-01T11:50:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pratikshatiwari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pratikshatiwari/32/116646_2.png) [@pratikshatiwari](https://discuss.elastic.co/u/pratikshatiwari)\
**Post date:** [February 1, 2023, 11:50am UTC](https://discuss.elastic.co/t/apm-with-container-not-working/324419/1 "2023-02-01T11:50:27Z")

</div>

Hello Team,  
I am trying to enable elastic APM & RUM for Kubernetes containerized application. but not finding any clue how do i enable them

below is the yaml file which we deploy using kubectl apply command, is there any way i can deploy APM using below YAML file?

Kindly assist

deployment.yaml file content as below

apiVersion: apps/v1  
kind: Deployment  
metadata:  
name: k8s-service-books  
spec:  
replicas: 1  
selector:  
matchLabels:  
app: k8s-service-books  
template:  
metadata:  
labels:  
app: k8s-service-books  
spec:  
containers:  
- name: service-books  
image: XXXX-docker.pkg.dev/XXXX/XXXX/XXXX:v1  
imagePullPolicy: Always  
ports:  
- containerPort: 8081  
resources:  
limits:  
cpu: 500m  
requests:  
cpu: 200m  
readinessProbe:  
httpGet:  
port: 8081  
path: /books/actuator/health/readiness  
initialDelaySeconds: 30  
periodSeconds: 10  
livenessProbe:  
httpGet:  
port: 8081  
path: /books/actuator/health/liveness  
initialDelaySeconds: 30  
periodSeconds: 10

Regards  
Pratiksha

---

<div class="post-metadata">

**Author:** ![Alberto\_Delgado](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alberto_delgado/32/98488_2.png) [@Alberto\_Delgado](https://discuss.elastic.co/u/Alberto_Delgado)\
**Post date:** [February 6, 2023, 9:34am UTC](https://discuss.elastic.co/t/apm-with-container-not-working/324419/2 "2023-02-06T09:34:22Z")

</div>

Hi @pratikshatiwari,

You can find more information about it in the following documentation:

- [Run Fleet-managed Elastic Agent on ECK | Elastic Cloud on Kubernetes [2.6] | Elastic](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-elastic-agent-fleet.html)
- [Run APM Server on ECK | Elastic Cloud on Kubernetes [2.6] | Elastic](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-apm-server.html)

Hope this helps you

Cheers,  
Alberto

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 6, 2023, 9:34am UTC](https://discuss.elastic.co/t/apm-with-container-not-working/324419/3 "2023-03-06T09:34:29Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
