Implementing observability for a distributed application running on Amazon EKS
In this section, we will see how to set up your Amazon EKS cluster to use native CloudWatch features and Container Insights. We will postpone alternative methods using Amazon OpenSearch or Prometheus and Grafana to later chapters.
We will see two different methods to set up metrics collection on Amazon EKS. Amazon EKS lets you host your pods using EC2 worker nodes or AWS Fargate. When using EC2 worker nodes, we can collect metrics directly from the kubelet agent. But, when using AWS serverless compute for Fargate containers, no pod has access to the kubelet, so we need a different approach.
Let’s see the two different methods in the next subsections.
Container Insights metrics on your EKS EC2 or customer-managed Kubernetes clusters
Whenever you want a system or workload to call AWS APIs on your behalf, you need to give it the correct permissions, which is similar to publishing metrics...