Helpful Terraform Links:
terraform init
terraform plan -var-file="vars/dev-west-2.tfvars"
terraform apply -var-file="vars/dev-west-2.tfvars"
chmod 400 <keypair>
ssh -i <keypair> ec2-user@<public_dns>
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
#To get context information of kubernetes cluster
cat /home/ec2-user/.kube/config
#To create namespace in kubernetes cluster
kubectl create namespace test
#To get deployments in a namespace in kubernetes cluster
kubectl get deployments --namespace=test
#To get services in a namespace in kubernetes cluster
kubectl get svc --namespace=test
#To delete everything in a namespace in kubernetes cluster
kubectl delete all --all -n test
#To delete unused docker images to cleanup memeory on system
docker system prune
#To delete a docker image
docker image rm imagename
#To Create EKS cluster
eksctl create cluster --name kubernetes-cluster --version 1.23 --region us-west-2 --nodegroup-name linux-nodes --node-type t2.xlarge --nodes 2
#To Delete EKS cluster
eksctl delete cluster --region=us-west-2 --name=kubernetes-cluster #delete eks cluster
terraform destroy -var-file="vars/dev-west-2.tfvars"