• 프로필사진
    Home
  • Portfolio
  • github [#ffffff] Created with Sketch.
    Github
  • linkedin
    Linkedin
  • Setting
  • Posting
    • 분류 전체보기 (105)
      • Aws (96)
      • Backend (3)
      • Extension (1)
  • 방문자 수
    • 전체:
    • 오늘:
    • 어제:
  • 최근 댓글
      등록된 댓글이 없습니다.
    • 최근 공지
        등록된 공지가 없습니다.
      # Home
      # 공지사항
      #
      # 태그
      # 검색결과
      # 방명록
      • EKS CloudWatch Insight
        2024년 12월 27일
        • wngnl05
        • 작성자
        • 2024.12.27.:02

        Link

         

        시작하기 전에 EKS NodeGroup IAM 역활에 아래의 정책을 추가해줍니다.

        CloudWatchAgentServerPolicy

         

        CloudWatch Insight 역활 생성하기

        CLUSTER_NAME=""
        OIDC_ID=$(aws eks describe-cluster --name $CLUSTER_NAME --query "cluster.identity.oidc.issuer" --output text | sed 's|https://||')
        ACCOUNT_ID=$(aws sts get-caller-identity --query "Account" --output text)
        OIDC_ARN="arn:aws:iam::$ACCOUNT_ID:oidc-provider/$OIDC_ID"
        aws iam create-role --role-name wngnl_CloudWatch_Insight_Role --assume-role-policy-document "{
            \"Version\": \"2012-10-17\",
            \"Statement\": [
                {
                    \"Effect\": \"Allow\",
                    \"Principal\": {
                        \"Federated\": \"${OIDC_ARN}\"
                    },
                    \"Action\": \"sts:AssumeRoleWithWebIdentity\",
                    \"Condition\": {
                        \"StringEquals\": {
                            \"${OIDC_ID}:aud\": \"sts.amazonaws.com\",
                            \"${OIDC_ID}:sub\": \"wngnl-cloudwatch-agent\"
                        }
                    }
                }
            ]
        }"
        # PowerUserAccess 정책 연결
        aws iam attach-role-policy --role-name wngnl_CloudWatch_Insight_Role --policy-arn arn:aws:iam::aws:policy/PowerUserAccess
        aws iam attach-role-policy --role-name wngnl_CloudWatch_Insight_Role --policy-arn arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy
        aws iam attach-role-policy --role-name wngnl_CloudWatch_Insight_Role --policy-arn arn:aws:iam::aws:policy/CloudWatchFullAccess

         

        yaml 파일 다운로드

        wget https://raw.githubusercontent.com/wngnl-dev/AWS/main/EKS/CloudWatch/Insight/configmap.yaml
        wget https://raw.githubusercontent.com/wngnl-dev/AWS/main/EKS/CloudWatch/Insight/serviceaccount.yaml
        wget https://raw.githubusercontent.com/wngnl-dev/AWS/main/EKS/CloudWatch/Insight/daemonset.yaml

         

         

         

         

        CloudWatch > 인사이트 > Container Insight > 클러스터 개요

        에 클러스터가 있는지 확인해줍니다.

         

         

         

         

        저작자표시 비영리 변경금지 (새창열림)

        'Aws' 카테고리의 다른 글

        Linux Server에서 OpenSearch로 로그 보내기  (0) 2024.12.27
        Dockerfile 로 Python 앱 배포하기  (0) 2024.12.27
        Node.js로 Lambda@Edge 이미지 리사이징 하기  (1) 2024.12.27
        IAM USER ap-northeast-2 외의 국가는 제한하기  (0) 2024.12.27
        앤드포인트로 EC2 접속하는 방법  (0) 2024.12.27
        다음글
        다음 글이 없습니다.
        이전글
        이전 글이 없습니다.
        댓글
      조회된 결과가 없습니다.
      스킨 업데이트 안내
      현재 이용하고 계신 스킨의 버전보다 더 높은 최신 버전이 감지 되었습니다. 최신버전 스킨 파일을 다운로드 받을 수 있는 페이지로 이동하시겠습니까?
      ("아니오" 를 선택할 시 30일 동안 최신 버전이 감지되어도 모달 창이 표시되지 않습니다.)
      목차
      표시할 목차가 없습니다.
        • 안녕하세요
        • 감사해요
        • 잘있어요

        티스토리툴바