https://drive.google.com/file/d/1n5QHiFhACU3Wax24ZT1iMVsEP-xf6tiP/view?usp=sharing
cd IaC/live/terragrunt/ap-southeast-1/dev
terragrunt run-all init
terragrunt run-all plan --terragrunt-exclude-dir ./ingress-nginx/ --terragrunt-exclude-dir ./route53/
terragrunt run-all apply
<!-- IaC/kubeconfig.yaml -->
cd eks/
terragrunt output kubeconfig > ../../../../../../kubeconfig.yaml
<!-- connect to EKS -->
aws eks --region ap-southeast-1 update-kubeconfig --name dev-eks-t
Test cluster with kubectl
export KUBECONFIG=$(pwd)/kubeconfig.yaml
kubectl get nodes
For WSL on Windows:
<!-- Only run if it is not exist folder ~/.kube/ -->
mkdir ~/.kube/
<!-- if existing folder ~/.kube/config -->
rm -f ~/.kube/config
cp /mnt/c/Users/duyquangtran/.kube/config ~/.kube/config
cd ansible
ansible-playbook -i inventory/eks.yaml playbooks/eks-manifests.yaml --extra-vars "env=dev"
kubectl get pods
cd ansible
ansible-playbook -i inventory/eks.yaml playbooks/eks-manifests.yaml --extra-vars "state=absent" --extra-vars "env=dev"
cd IaC
cd IaC/live/terragrunt/ap-southeast-1/dev
terragrunt run-all destroy
- try to run ansible on k8s local -- V
- setup full flow configuration with ansible (application, logging, monitoring, tracing, argocd)
- data_store -- V
- scrape_data -- V
- ingress-nginx, argocd (step isolate) -- V
- application (api, web) -- V
- logging -- V
- metrics -- V
- tracing -- V
- try to integrate ingress-nginx and argocd in ansible -- V
- run terragrunt => provision Infrastruct => test infra -- V
- apply ansible on aws infra -- V
- apply CI auto create Infra and Config by dagger
NOTE:
eksctl create iamserviceaccount
--name
--namespace
--cluster
--attach-policy-arn arn:aws:iam:::policy/
--approve