# Deployment apiVersion: apps/v1 kind: Deployment metadata: name: cloudwatch-agent-statsd namespace: amazon-cloudwatch spec: replicas: 1 selector: matchLabels: app: cloudwatch-agent-statsd template: metadata: labels: app: cloudwatch-agent-statsd spec: containers: - name: cloudwatch-agent image: public.ecr.aws/cloudwatch-agent/cloudwatch-agent:latest imagePullPolicy: Always resources: limits: cpu: 200m memory: 100Mi requests: cpu: 200m memory: 100Mi # Pleaes don't change the mountPath volumeMounts: - name: cwagentconfig mountPath: /etc/cwagentconfig volumes: - name: cwagentconfig configMap: name: cwagentstatsdconfig terminationGracePeriodSeconds: 60 --- # Service kind: Service apiVersion: v1 metadata: name: cloudwatch-agent-statsd namespace: amazon-cloudwatch spec: selector: app: cloudwatch-agent-statsd ports: - protocol: UDP port: 8125 # target port should be consistent with the listen port defined in configmap targetPort: 8125