📂
Amazon EKS
  • Amazon EKS
  • 워크스페이스 생성하기
    • Cloud9 IDE 환경 구성
    • IAM 역할 생성
    • SSH & CMK Key 생성하기
  • EKS 클러스터 구축
    • EKS 클러스터 만들기
  • 쿠버네티스 대시보드 배포
    • Kubernetes 공식 대시보드 배포
  • 마이크로서비스 배포
    • 예제 애플리케이션 배포
    • 서비스 스케일(Scaling)
    • 애플리케이션 정리하기
  • 애플리케이션 배포 - Helm
    • HELM 설치
    • Helm으로 Nginx 배포
    • Helm을 사용하여 마이크로서비스 배포
    • 정리하기
  • 리소스 관리 - POD 배치
    • NodeSelector
    • Affinity and Anti-affinity
    • 더 실용적인 사용 사례
    • 정리하기
  • 리소스 관리 - Health Checks
    • Liveness 프로브 구성
    • Readiness 프로브 구성
    • 정리하기
  • 리소스 관리 - AutoScaling
    • HPA 구성하기
    • CA 구성하기
    • 정리하기
  • 네트워킹 - 서비스 노출
    • 서비스와 애플리케이션 연결
    • 서비스에 접근하기
    • 서비스 노출
    • Ingress
    • Ingress Controller
    • 정리하기
  • 네트워크 - Calico 정책
    • Calico 설치하기
    • Stars Policy Demo
    • 정리하기
  • Updating 권한설정 - RBAC
    • 테스트 POD 설치
    • 사용자 생성 및 맵핑
    • 역할과 바인딩
    • 정리하기
  • Updating 권한설정 - IAM 그룹
    • IAM Role, Group & User 생성하기
    • RBAC 설정하기
    • EKS 엑세스 테스트
    • 정리하기
  • Updating 권한설정 - Service account
    • OIDC 자격 증명 공급자 생성하기
    • IAM 역할 생성 및 지정
    • 샘플 POD 배포
    • 정리하기
  • Updating - 네트워크 - POD Security Group
    • SG 생성하기
    • RDS 생성하기
    • CNI 구성하기
    • SG 정책
    • Pod 배포하기
    • 정리하기
  • Updating - 모니터링 - Prometheus and Grafana
    • Prometheus 배포하기
    • Grafana 배포하기
    • 정리하기(Optional)
  • Updating 모니터링 - X-Ray
    • X-Ray DaemonSet 배포하기
    • 샘플 마이크로서비스 배포
    • X-Ray console 확인
    • 정리하기(Optional)
  • Updating 모니터링 - Container Insights
    • 사전 준비
    • Container Insights 구성하기
    • 부하 테스트
    • Container Insights 확인하기
    • 정리하기(Optional)
  • Updating CD - Gitops with Flux
    • 사전 준비
    • Codepipeline
    • EKS에 배포
    • 정리하기
  • Updating Argo Rollouts
  • Updating Service Mesh - AWS App Mesh
    • Fargate 및 OBSERVABILITY 구성
    • Product Catalog App 배포
    • APP MESH 설치
    • Porting to APP MESH
    • Virtual Gateway 구성
    • Canary
    • Observability
  • Updating 버전 업그레이드 - EKS Cluster
    • Upgrade EKS control Plane
    • Upgrade EKS CORE ADD-ONs
    • Upgrade Managed Node Group
Powered by GitBook
On this page

Was this helpful?

  1. Updating - 네트워크 - POD Security Group

정리하기

이번 실습에서 사용한 리소스를 정리합니다.

export VPC_ID=$(aws eks describe-cluster \
    --name eksworkshop-eksctl \
    --query "cluster.resourcesVpcConfig.vpcId" \
    --output text)
export RDS_SG=$(aws ec2 describe-security-groups \
    --filters Name=group-name,Values=RDS_SG Name=vpc-id,Values=${VPC_ID} \
    --query "SecurityGroups[0].GroupId" --output text)
export POD_SG=$(aws ec2 describe-security-groups \
    --filters Name=group-name,Values=POD_SG Name=vpc-id,Values=${VPC_ID} \
    --query "SecurityGroups[0].GroupId" --output text)
export C9_IP=$(curl -s http://169.254.169.254/latest/meta-data/public-ipv4)
export NODE_GROUP_SG=$(aws ec2 describe-security-groups \
    --filters Name=tag:Name,Values=eks-cluster-sg-eksworkshop-eksctl-* Name=vpc-id,Values=${VPC_ID} \
    --query "SecurityGroups[0].GroupId" \
    --output text)

# uninstall the RPM package
sudo yum erase -y postgresql

# delete database
aws rds delete-db-instance \
    --db-instance-identifier rds-eksworkshop \
    --delete-automated-backups \
    --skip-final-snapshot

# delete kubernetes element
kubectl -n sg-per-pod delete -f ~/environment/sg-per-pod/green-pod.yaml
kubectl -n sg-per-pod delete -f ~/environment/sg-per-pod/red-pod.yaml
kubectl -n sg-per-pod delete -f ~/environment/sg-per-pod/sg-policy.yaml
kubectl -n sg-per-pod delete secret rds

# delete the namespace
kubectl delete ns sg-per-pod

# disable ENI trunking
kubectl -n kube-system set env daemonset aws-node ENABLE_POD_ENI=false
kubectl -n kube-system rollout status ds aws-node

# detach the IAM policy
aws iam detach-role-policy \
    --policy-arn arn:aws:iam::aws:policy/AmazonEKSVPCResourceController \
    --role-name ${ROLE_NAME}

# remove the security groups rules
aws ec2 revoke-security-group-ingress \
    --group-id ${RDS_SG} \
    --protocol tcp \
    --port 5432 \
    --source-group ${POD_SG}

aws ec2 revoke-security-group-ingress \
    --group-id ${RDS_SG} \
    --protocol tcp \
    --port 5432 \
    --cidr ${C9_IP}/32

aws ec2 revoke-security-group-ingress \
    --group-id ${NODE_GROUP_SG} \
    --protocol tcp \
    --port 53 \
    --source-group ${POD_SG}

aws ec2 revoke-security-group-ingress \
    --group-id ${NODE_GROUP_SG} \
    --protocol udp \
    --port 53 \
    --source-group ${POD_SG}

# delete POD security group
aws ec2 delete-security-group \
    --group-id ${POD_SG}

POD Security 실습을 완료하였습니다.

PreviousPod 배포하기NextUpdating - 모니터링 - Prometheus and Grafana

Last updated 3 years ago

Was this helpful?