Container Insights 구성하기

circle-info

이 실습의 자세한 전체 내용은 여기arrow-up-right서 확인하실 수 있습니다.

1. 사전 준비

workernode에 필요한 IAM policy를 추가합니다.

CloudWatch가 필요한 모니터링 정보를 얻으려면 CloudWatch 에이전트를 EKS 클러스터에 설치해야 합니다. 먼저, 사용 역할 이름이 환경에 설정되어 있는지 확인해야 합니다.

test -n "$ROLE_NAME" && echo ROLE_NAME is "$ROLE_NAME" || echo ROLE_NAME is not set
circle-exclamation

node의 IAM Role에 policy 'CloudWatchAgentServerPolicy' 를 추가합니다.

IAM Role에 추가한 policy를 확인합니다.

2. Container Insights 설치하기

Container Insights를 구성하기 위해 Quick start instructionsarrow-up-right를 수행합니다.

위 명령어를 수행하면 아래의 동작이 수행됩니다.

  • Namespace amazon-cloudwatch 생성함.

  • DaemonSet에 대한 security object를 생성

    • SecurityAccount

    • ClusterRole

    • ClusterRoleBinding

  • DaemonSet으로 Cloudwatch-Agent (responsible for sending the metrics to CloudWatch)을 배포함.

  • DaemonSet으로 fluentd (responsible for sending the logs to Cloudwatch)을 배포함.

  • 두 DaemonSets에 대한 ConfigMap configurations 을 배포함.

DaemonSets가 정상적으로 배포 되었는지 확인합니다.

아래 명령어를 수행하여 나온 URL을 통해 접속하여 data가 CloudWatch에 수집되고 있는지 확인합니다.

Last updated