In this recipe, we will learn how to use CloudWatch to monitor node and pod metrics in our Kubernetes cluster:
- Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/:
- Click on the down arrow button next to the Overview option and choose Container Insights from the list:
- To view the EKS node health and statistics, in the top-left corner, switch to EKS nodes. Graphs on the new view will show resource utilization, cluster failures, and the number of nodes in a historical view similar to the following screenshot:
- To view the container performance statistics, in the top-left corner, switch to EKS pods. Graphs on the new view will show the total resource utilization of pods and list of pods with their individual CPU and memory consumption percentages similar to the following screenshot:
- To view the detailed logs or AWS X-Ray traces of any resource, select the resource name from the list and click on the Actions button. From the drop-down menu, you can choose logs that you would like to review. After you select, logs will open in a new window:
Now you have learned how to monitor node and pod metrics in your Kubernetes cluster using Container Insights.