Skip to content

Chaedie/devops-pjt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DevOps Project

0. Configure IAM User for Terraform CLI

  1. add permissions -> "AdministratorAccess" (for convenience on demo project)
  2. create Access key
  3. $ aws configure
  4. input access key and secret key
    • check cat ~/.aws/credentials
    • check cat ~/.aws/config

1. VPC

📦terraform
 ┣ 📜0-locals.tf
 ┣ 📜1-providers.tf
 ┣ 📜2-vpc.tf
 ┣ 📜3-igw.tf
 ┣ 📜4-subnets.tf
 ┣ 📜5-nat.tf
 ┗ 📜6-routes.tf
  • 1 IGW
  • 2 Public Subnet (AZ A, B)
    • 1 NAT Gateway
  • 2 Private Subnet (AZ A, B)

2. EKS

📦terraform
 ┣ 📜7-eks.tf
 ┗ 📜8-nodes.tf
  • EKS (Managed by AWS)
  • Nodes (Managed by AWS)
$ aws eks update-kubeconfig \
  --region ap-northeast-2 \
  --name staging-demo # make kubectl towards eks
$ kubectl get nodes
$ kubectl auth can-i "*" "*"

3. Add IAM User & IAM Role to AWS EKS

$ aws configure --profile developer
$ aws sts get-caller-identity --profile developer
$ aws eks update-kubeconfig \
  --region ap-northeast-2 \
  --name staging-demo \
  --profile developer
$ aws configure --profile manager
$ aws sts assume-role \ 
  --role-arn arn:aws:iam::039612876607:role/staging-demo-eks-admin \
  --role-session-name manager-session \
  --profile manager
$ aws eks update-kubeconfig \
  --region ap-northeast-2 \
  --name staging-demo \
  --profile eks-admin
$ kubectl config view --minify

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages