본문 바로가기

AWS138

[Terraform/AWS] cross account TGW-DX Attach 이번에 팔자에도 없던 DX를 좀 보게 되었다.Transit Gateway에 DX GW를 Attach해야 했는데, 다중 프로바이더 환경에서 테라폼으로 작업할 때 좀 해멨어서 이렇게 남긴다. 먼저, 동일 프로바이더 환경에서 TGW, DX GW를 만들고 Attach시키는건 다음과 같다. # TGW 생성resource "aws_ec2_transit_gateway" "this" { description = "honglab-tgw"}# DX GW 생성resource "aws_dx_gateway" "this" { name = "honglab-dx" amazon_side_asn = "64512"}# DX GW - TGW Association 생성# -> TGW Attach 리소스가 자동으로 생.. 2025. 2. 5.
[AI/Amazon Bedrock] 카카오페이증권 춘시리 이번에 새롭게 합류한 카카오페이증권에서,운이 좋게도 재밌는 프로젝트를 할당받아 즐거운 시간을 보냈습니다.(그동안 개인블로그가 뜸했던 이유.. ㅋㅋ)amazon bedrock을 활용해 ai지식이 없는 엔지니어도 쉽게 ai챗봇을 개발할 수 있었습니다.그리고 춘식이가 너무 귀여워서 개발할 맛이 났습니다.https://tech.kakaopay.com/post/choonsiri/ 페이증권의 업무도우미 AI봇을 소개합니다! 근데 이제 춘식이를 곁들인 | 카카오페이 기술 블로아마존 베드락을 활용하여 사내 지식저장소를 구축하고, AI챗봇 및 코드리뷰봇을 개발한 경험을 공유합니다.tech.kakaopay.com많관부✌️ 2025. 1. 23.
[AWS] 콘솔 상단 색 변경 Extension https://aws.amazon.com/ko/about-aws/whats-new/2025/01/aws-management-console-simultaneous-sign-in-multiple-accounts/ The AWS Management Console now supports simultaneous sign-in for multiple AWS accounts - AWSToday, AWS announces multi-session support, which enables AWS customers to access multiple AWS accounts simultaneously in the AWS Console. AWS Customers can sign-in to up to 5 sessions in a.. 2025. 1. 19.
digitickets/terraform-aws-cli 모듈 기여 https://github.com/digitickets/terraform-aws-cli/releases/tag/v7.0.0 Release v7.0.0: Merge branch 'issue_19_json_decoding' · digitickets/terraform-aws-cliv7.0.0 - 2024/08/06 Fix a typo in the description for the var.external_id. Fix handling of invalid JSON returned from the AWS CLI. Thank you 홍수민 and horststumpf. Introduced 2 new outputs: ou...github.com   내가 올린 PR : https://github.com/digitick.. 2024. 8. 7.
[aws-load-balancer-controller] failed calling webhook "mtargetgroupbinding.elbv2.k8s.aws" # 사전 설명폐쇄망에서 eks 구축을 하고 있었다.A 계정의 A 클러스터를 먼저 만들어보고, 테라폼 모듈을 완성해 다른 B, C, D 계정에도 똑같이 만들려고 하는데...Internal error occurred: failed calling webhook "mtargetgroupbinding.elbv2.k8s.aws": failed to call webhook: Post "https://aws-load-balancer-webhook-service.kube-system.svc:443/mutate-elbv2-k8s-aws-v1beta1-targetgroupbinding?timeout=10s": context deadline exceeded TargetGroupBinding 객체를 만드려고 시도할 때 마다 이.. 2024. 7. 17.
[AWS/EC2] Proxy Setup user_data (Linux, Windows) # Linux# linux.sh#!/bin/bashPROXY_URL="http://proxy.domain:3128"NO_PROXY="169.254.169.254,localhost,127.0.0.1,.svc.cluster.local,.amazonaws.com,172.16.0.0/12,10.0.0.0/8,192.168.0.0/16,.internal"echo "export http_proxy=$PROXY_URL" | tee -a /etc/profile.d/proxy.shecho "export https_proxy=$PROXY_URL" | tee -a /etc/profile.d/proxy.shecho "export no_proxy=$NO_PROXY" | tee -a /etc/profile.d/proxy.shso.. 2024. 7. 9.
[AWS EKS] 보안그룹 최소 필요사항 정리 - 폐쇄망 기준- VPC Endpoint는 필요한 것 모두 생성되어 있다고 가정- inbound / outbound 모두 제어 (any는 없음)- Node의 보안그룹 / Cluster의 보안그룹은 각자의 클러스터 아키텍처에 맞게 생각 보안그룹typeprotocolport대상설명Node 보안그룹ingresstcp443, 10250Cluster 보안그룹필수 통신 포트Node 보안그룹egresstcp443, 10250Cluster 보안그룹필수 통신 포트Node 보안그룹egresstcp, udp53Cluster 보안그룹DNSNode 보안그룹egresstcp443VPC Endpoint 보안그룹endpoint 통신Node 보안그룹egresstcp443S3 Prefix Listendpoint 통신      Clust.. 2024. 7. 1.
[Terraform/AWS ECR] 외부 이미지 ECR에 캐싱하기 (Pull Through Cache Rule) # ECR Pull Through Cache Rule 이란?쉽게 말해, 외부의 도커 이미지 레지스트리(ex - docker.io, ghcr.io, public.ecr.aws) 에 있는 도커 이미지를 내 AWS 계정의 ECR로 가져올 수 있게 규칙을 생성해 두는 것이다.공식 도큐 - https://docs.aws.amazon.com/AmazonECR/latest/userguide/pull-through-cache-creating-rule.html Creating a pull through cache rule in Amazon ECR - Amazon ECRThe AWS Management Console only displays Secrets Manager secrets with names using the .. 2024. 6. 30.
[AWS EKS] CoreDNS Addon을 FARGATE로 띄우기 (w. Terraform) # 0. 서론eks의 모든 노드들을 카펜터로 띄우기 시작했다.카펜터가 아닌 노드가 없기 때문에 karpenter 자체는 fargate로 띄워야만 했다.여기까지는 managed node group > karpenter로 마이그레이션하다가 알게 된 것이고.. 카펜터만 띄우는 설정으로 새로 클러스터를 띄우다보니 coredns가 karpenter보다 먼저 떠야 한다는 것을 알게 되었다.(카펜터도 내부 dns에 의존하는 무언가가 있나보다. 더 자세히 알아보진 않았다.) 따라서 karpenter와 마찬가지로 coredns도 fargate로 띄우도록 설정을 변경하게 되었다.이 때 필요한 과정을 terraform으로 설명하겠다. # 1. coredns fargate profile 생성locals { cluster_n.. 2024. 4. 28.
[AWS EKS] 클러스터 보안그룹 vs 추가 보안그룹 (Cluster SG vs Additional SG) # 결론클러스터 보안그룹과 추가 보안그룹은 다르다.클러스터 보안그룹 (EKS 생성 시 자동 생성되며, self rule도 자동으로 생성되어 있음) 은 eks api로 만든 컴퓨팅 리소스 (fargate, managed ec2 node group) 들에 적용된다.즉,컨트롤플레인의 cross-eni : 클러스터 보안그룹 & 추가 보안그룹 사용fargate, managed node group 노드 : 클러스터 보안그룹 사용자체 런치템플릿 사용한 managed node group, self managed 노드 : 커스텀 보안그룹 사용 (내가 지정하는걸로) # 일단 용어정리클러스터 보안그룹 : eks 클러스터 생성 시 자동으로 생성되는 "Cluster security group"추가 보안그룹 : eks 클러스터 .. 2024. 4. 28.
[AWS/EC2/Quota] You have requested more vCPU capacity than your current vCPU limit of 64 allows for the instance bucket that the specified instance type belongs to. p4d.24xlarge EC2를 만들 일이 있었는데, 아래와 같은 에러가 났다. Instance launch failed You have requested more vCPU capacity than your current vCPU limit of 64 allows for the instance bucket that the specified instance type belongs to. Please visit http://aws.amazon.com/contact-us/ec2-request to request an adjustment to this limit. Instance launch failed You have requested more vCPU capacity than your current vCPU.. 2024. 4. 11.
[k8s/ingress-nginx/aws] Chart: Add a TargetGroupBinding 결론 : 너무 user specific하다고 close 됨. >> 내가 별도로 차트 올려둠 (ingress-nginx-4.10.0 기반, https://artifacthub.io/packages/helm/suminhong/ingress-nginx-external-lb) https://github.com/kubernetes/ingress-nginx/pull/11198 Chart: Add a TargetGroupBinding object to the ingress-nginx helm chart template. by suminhong · Pull Request #11198 · kubernet What this PR does / why we need it: Add a TargetGroupBinding obje.. 2024. 4. 4.
[EKS/Access Configuration] Managed Node Group > Karpenter Migration 시 aws-auth 문제 해결 # 이슈 발생 원래 Managed EC2 Node Group으로 EKS를 구성해 두었다가, Karpenter PoC를 마치고 모두 넘어가려고 준비중이었다. 따라서 Managed Node Group (이하 node group) & Karpenter가 모두 떠 있었고, node group은 노드를 0으로만 유지중이었다. 이제 모든 클러스터가 카펜터로 잘 동작중이기 때문에, node group은 이제 지워야지! 하고 dev 클러스터부터 전부 지움. 그러자 ... 갑자기 카펜터로 뜬 노드들이 전부 죽기 시작했다. # 뭔지 모르겠지만 일단 롤백 아무리 생각해도 node group이랑 카펜터에 연관 관계가 있을 것 같지 않았다. 근데 롤백하니까 (node group 살리니까) 카펜터 노드들도 다시 살아나기 시작했다.. 2024. 3. 28.
[AD/AWS Directory Service/Terraform] Admin User 비밀번호 만료 우선 내 환경은 AWS Directory Service - Microsoft AD 를 사용해 AD를 구축해둔 상태이다. 해당 AD를 컨트롤하기 위해 Controller 서버도 띄워두었고, User를 쉽게 만들기 위해 Terraform 에서 ldap Provider를 사용해 붙고 있었다. 그런데 어느 날, Error: error binding: LDAP Result Code 49 "Invalid Credentials": 80090308: LdapErr: DSID-0C090569, comment: AcceptSecurityContext error, data 532, v4563 라는 에러가 뜨면서 plan이 실패했다. Controller 서버에 RDP 접속도 안되었다. 근데 이 때 나온 에러는 비밀번호가 만료.. 2024. 3. 21.
[Karpenter] Disruption budget (중단 제어) 사용하기 (v0.34.0~) (feat. karpenter upgrade) https://aws.amazon.com/ko/about-aws/whats-new/2024/02/disruption-controls-karpenter/ Karpenter에 대한 중단 제어 기능 발표 오늘 v0.34.0 릴리스부터 오픈 소스 Karpenter 프로젝트를 사용하는 Amazon Elastic Kubernetes Service(EKS) 고객에게 Kubernetes 클러스터의 Amazon EC2 인스턴스에 획기적인 변경이 적용되는 방법과 시기를 제어할 aws.amazon.com https://karpenter.sh/v0.34/concepts/disruption/ Disruption Understand different ways Karpenter disrupts nodes karpenter.sh k.. 2024. 3. 9.