Soru

Zorluk: OrtaCloudWatch Dashboards and Container Insights

A SysOps Administrator is setting up a custom Amazon CloudWatch dashboard to monitor container performance for an Amazon EKS cluster that runs on Amazon EC2 worker nodes. The Administrator has deployed the CloudWatch agent as a DaemonSet in the cluster, but no Container Insights metrics are appearing in CloudWatch. Which combination of actions will resolve this issue and allow the Administrator to display these metrics on the custom dashboard? (Select TWO.)

  1. Attach the CloudWatchAgentServerPolicy managed policy to the IAM role associated with the Amazon EKS node groups.Cevap
  2. Create a metric widget on the CloudWatch dashboard that references metrics under the ContainerInsights namespace.Cevap
  3. C
    Enable Amazon EC2 detailed monitoring for the instances in the Amazon EKS node groups.
  4. D
    Create a CloudWatch Logs metric filter on the /aws/containerinsights log group to parse performance events and publish them to a custom namespace.
  5. E
    Assign the CloudWatchReadOnlyAccess managed policy to the EKS cluster's IAM service account using IAM Roles for Service Accounts (IRSA).

Cevap

The correct actions are to attach the CloudWatchAgentServerPolicy managed policy to the IAM role associated with the Amazon EKS node groups, and to create a metric widget on the CloudWatch dashboard that references metrics under the ContainerInsights namespace.
To collect Container Insights metrics on Amazon EKS running on EC2 worker nodes, the CloudWatch agent must be deployed and granted permissions to write metrics to CloudWatch via the CloudWatchAgentServerPolicy IAM policy. Once permissions are configured and metrics are sent, they are stored in the ContainerInsights namespace. Creating a metric widget pointing to this namespace allows the Administrator to visualize the EKS container performance on a custom dashboard.

Adım Adım Çözüm

1
Attach the required IAM permissions to the EKS node group.
The CloudWatch agent DaemonSet running on the EC2 worker nodes gains the necessary write permissions to publish metric data to CloudWatch.
By default, EKS worker nodes do not have permission to write logs or metrics to CloudWatch, which prevents Container Insights from functioning.
2
Configure the dashboard widget to reference the correct namespace.
The custom CloudWatch dashboard displays container performance metrics like pod CPU and memory utilization.
Container Insights metrics are collected and pushed to the ContainerInsights namespace, which must be selected in the dashboard widget configuration.

Anahtar Kavram

Enabling CloudWatch Container Insights on an Amazon EKS cluster running on EC2 nodes requires deploying the CloudWatch agent and granting it write permissions using the CloudWatchAgentServerPolicy IAM policy. Once metrics are successfully collected, they are published to the ContainerInsights namespace, where they can be queried and visualized on custom CloudWatch dashboards.
Bu soruyu puanla