You will now remove the resources created during the workshop.
kubectl delete ingress/spot-demo
kubectl delete service/spot-demo
kubectl delete deployment/spot-demo
cd ~/environment/amazon-ec2-spot-cicd-workshop/gitlab-spot/eks-cluster
TOKEN=$(curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 600")
export TF_VAR_aws_region=$(curl -s -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/placement/region)
export TF_VAR_alb_policy=$(aws iam get-policy --policy-arn arn:aws:iam::$(aws sts get-caller-identity --output text --query Account):policy/AWSLoadBalancerControllerIAMPolicy --query Policy.Arn --output text)
terraform destroy
yes
and press Enter. Wait until the process is finished and close your Cloud9 environment.linux-docker-scaling-spotonly
.GitLabRunner
and the policies GitLabRunnerPolicy
and AWSLoadBalancerControllerIAMPolicy
, unless you had it before the workshop.gitlabworkshopc9outputbucket
in its name and remove all objects inside it.At this point, we would like to thank you for attending this workshop.