Amazon Web Service (AWS)
-
FluentBit + CloudWatch logs 로 Pods Application 로그 수집하기Amazon Web Service (AWS)/EKS 2023. 4. 23. 01:40
AWS를 개인적으로 구성하면서 적다보니, 140만원이 청구되어 환경이 갖춰지기 전까진 글로만...빨간색 부분에서 데몬셋으로 실행된 FluentBit가 각 Pods의 로그를 수집하여 CloudWatchLogs에 항목별로 쌓아주는 구성을 작성 참고글 : https://repost.aws/ko/knowledge-center/cloudwatch-stream-container-logs-eks (작성하고 찾아보니 질문이 아닌 공식 문서에도 적혀있다) Amazon EKS에서 컨테이너 로그를 CloudWatch로 스트리밍 | AWS re:PostAmazon Elastic Kubernetes Service(Amazon EKS)에서 실행되는 컨테이너 로그를 CloudWatch Logs와 같은 로깅 시스템으로 스트리밍하고 ..
-
EKS CI/CD 구축 (git, docker, argocd) - 2 Jenkins, GitLab, ArgoCD 연결Amazon Web Service (AWS)/EKS 2022. 8. 30. 02:30
Jenkins 구성 1. Install suggested plugins 선택 2. 회원가입 3. Jenkins 관리 선택 - 플러그인 관리 4. docker-build-step / Docker / Docker Pipeline / Amazon ECR / GitLab / GitLab Authentication 플러그인 설치 GitLab과 Jenkins 연동 1. Jenkins New Item 선택 후 Item name 입력, Freestyle project선택 2. Jenkins Credentials 설정 username : gitLab 아이디 password : gitLab 비밀번호 ID : jenkins에서 사용할 식별자 입력 후 Create ArgoCD 연결 1. ArgoCD 콘솔 비밀번호 확인 $ k..
-
EKS CI/CD 구축 (git, docker, argocd) - 1 환경 구성Amazon Web Service (AWS)/EKS 2022. 8. 28. 22:28
ArgoCD 구축 (https://www.eksworkshop.com/intermediate/290_argocd/install/) 1. ArgoCD 를 위한 네임스페이스 생성 $ kubectl create namespace argocd .2. ArgoCD namespace에 해당 yaml 파일을 적용 (Deployment.yaml) $ kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v2.4.7/manifests/install.yaml 3. ArgoCD Service를 LoadBalancer로 변경하여 외부 접속이 가능하게 함 $ kubectl patch svc argocd-server -n argocd -p '{..
-
EC2에 Docker 설치 후 ECR과 연동하기Amazon Web Service (AWS)/EKS 2022. 8. 19. 15:33
1. Docker 설치 1. yum 업데이트 $ sudo yum update -y 2. Docker 설치 $ sudo amazon-linux-extras install docker 3. sudo 명령어 없이 docker 명령어 사용 $ sudo usermod -a -G docker ec2-user 3. Docker 버전확인 docker -v 2. Docker hub에서 필요한 이미지 $ sudo docker pull openjdk:8 $ sudo docker pull openjdk:11 $ sudo docker pull openjdk:17 $ sudo docker pull jenkins/jenkins 2. 이미지 확인 sudo docker images 2. ECR 구축하기 1. AWS 접속 후 Elast..
-
[EKS] Kubernetes 기본 명령어Amazon Web Service (AWS)/EKS 2022. 8. 1. 17:54
1. help : kubernetes 기본 명령어를 알려주는 명령어 kubectl --help 2. get : 무엇의 정보를 보고 싶을 때 사용하는 명령어 2-1 nodes : 노드의 정보를 보여준다. kubectl get nodes 2-2 pods : 파드의 정보를 보여준다. kubectl get pods 2-3 -o wide : 정보를 더 자세하게 보여준다. kubectl get pods -o wide 2-4 -o yaml : 정보를 yaml 파일로 보여준다. kubectl get pod webserver -o yaml // pods 대신 pod를 쓰고 파드이름을 붙여 한개의 파드 정보만 확인 할 수 있다. 3. descride : 아주 자세한 정보를 보여준다. kube describe node ip..
-
[EKS] EKS Cluster 구축Amazon Web Service (AWS)/EKS 2022. 8. 1. 15:11
참고 (https://github.com/237summit/Kubernetes-on-AWS/blob/main/LAB_k8s_install) EKS control plane과 worker node로 구성되어 있습니다. (위 사진에서 Amazon Web Services 가 Cluster) 왼쪽 Clients를 EC2 서버로 구축하고 그 안에 aws , eksctl, kubectl 등을 설치합니다. aws → amazon IAM 계정을 연동 eksctl → EKS control plane을 구성 kubectl → kubenetes를 관리 VPC와 Subnet, Worker Node를 어떻게 구성해야 하나 찾아 봤었는데 CloudFormation을 통해 간단하게 구성 할 수 있었습니다. 하나의 AZ (Avail..
-
[EKS] EKS 클러스터 구축 용 IAM 그룹 생성Amazon Web Service (AWS)/EKS 2022. 8. 1. 14:58
IAM에 대해선 여기 를 눌러 확인 📑IAM 계정 생성하기 root 계정으로 IAM 화면 접속 { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": "iam:CreateServiceLinkedRole", "Resource": "*", "Condition": { "StringEquals": { "iam:AWSServiceName": [ "eks.amazonaws.com", "eks-nodegroup.amazonaws.com", "eks-fargate.amazonaws.com" ] } } }, { "Sid": "VisualEditor1", "Effect": "Allow", "Action":..
-
[EKS] Kuberetes 구조Amazon Web Service (AWS)/EKS 2022. 8. 1. 14:52
❗쿠버네티스의 구조 쿠버네티스는 하나의 컨트롤 플레인(마스터 노드) 와 여러 개의 워커 노드로 구성 되어있습니다. 클라이언트가 쿠버네티스를 동작하기 위해 kubectl 명령어를 사용하면 컨트롤 플레인의 API server 에서 그 명령어를 받아 해석하고 Scheduler와 Controller Manager에게 명령을 전달 합니다. Controller Manager는 클라이언트가 보낸 kubectl 명령대로 클라이언트가 원하는 상태로 쿠버네티스를 체크 합니다. (갑자기 Pod가 다운되면 Controller Manager가 체크하여 복구합니다) Scheduler는 kubectl 명령대로 Pod를 생성하는데 Worker node의 상태를 체크해서 가장 적합한 node에 Pod를 생성 시켜주는 역할을 합니다. ..