- python3
- cdk
- aws cli
- kubectl
aws and aws cli CDKDeployUser
credentials shared with e-mail.
- Go to
serverless-application
folder python3 -m pip install -r requirements.txt
- Run
cdk bootstrap cdk deploy
- Go to
iaac
folder python3 -m pip install -r requirements.txt
- Run
cdk bootstrap cdk deploy
- After ECR created you can login to ECR vai following commands (for MacOs/Linux)
aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin 050884211926.dkr.ecr.eu-west-1.amazonaws.com
- After EKS created copy the ConfigCommand from your terminal output and execute it, it should look something like this:
aws eks update-kubeconfig --name EKSStack-cluster --region eu-west-1 --role-arn arn:aws:iam::050884211926:role/EKSStack-iam
- Go to
web-app
folder - Run docker build command with ecr repository tag
docker build -t 050884211926.dkr.ecr.eu-west-1.amazonaws.com/web-app:latest .
- Push docker image to ECR
docker push 050884211926.dkr.ecr.eu-west-1.amazonaws.com/web-app:latest
- Deploy k8s yaml
kubectl create -f k8s/deployment.yaml kubectl create -f k8s/service.yaml
- Run following to get web-app url
You should see something like:
kubectl get svc
xxxxxxxxxxxxxx.eu-west-1.elb.amazonaws.com
- Plus for task
- Documentation is really simple and understandable.
- https://docs.aws.amazon.com/cdk/api/latest/python/aws_cdk.aws_s3/README.html
- https://docs.aws.amazon.com/cdk/api/latest/python/aws_cdk.aws_eks/README.html
- https://docs.aws.amazon.com/cdk/api/latest/python/aws_cdk.aws_ecr/README.html
- https://docs.aws.amazon.com/cdk/api/latest/python/aws_cdk.aws_lambda/README.html
- https://docs.aws.amazon.com/cdk/api/latest/python/aws_cdk.aws_dynamodb/README.html
- Easy to use
- Want to try EKS service
- Worked on a project before
- Faster development for me
- Easy to use
- Easy to find resource