I have ~600000 metrics in my CloudWatch Metrics CWAgent namespace. 99% of them are undesired and are derived from very short lived pods.
I turns out that the amazon-cloudwatch-agent running on EKS will create a set of 5 metrics for each pod:
pod_memory_utilizationpod_number_of_container_restartspod_cpu_utilizationpod_network_tx_bytespod_network_rx_bytes
Since I have Apache Airflow with the KubernetesExecutor running on that EKS cluster, a large number of really short lived pod are created regularly. Each task execution gets a pod that usually last a minute or so. So I end up with 5 new metrics for each execution, usually with a single datapoint or two (because I think it's one datapoint per minute).
These metrics are totally useless for me there are too many and there are not enough data points to actually do any interesting analysis/chart.
Is there anyway of preventing these metrics to be created in the first place? I still want the metrics for my long running Pods and Deployments.