Skip to content

Commit

Permalink
Fix create instance eksctl 5
Browse files Browse the repository at this point in the history
  • Loading branch information
edison.farinango committed Nov 29, 2024
1 parent 38b5046 commit acda4f8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions 01_eksctl/create-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,14 @@ if [ $? -eq 0 ]; then
if [ ! -z "$CLUSTER_EXISTS" ]; then
echo "El clúster '$CLUSTER_NAME' ya existe. Eliminándolo primero..."

# Eliminando el clúster existente
eksctl delete cluster --region us-east-1 --name "$CLUSTER_NAME"
# Eliminando la pila de CloudFormation asociada al clúster si existe
aws cloudformation delete-stack --stack-name "eksctl-eks-mundos-e-cluster" --region us-east-1

# Esperar hasta que la pila sea eliminada
echo "Esperando a que la pila de CloudFormation se elimine..."
aws cloudformation wait stack-delete-complete --stack-name "eksctl-eks-mundos-e-cluster" --region us-east-1

# Verificando que la pila se haya eliminado correctamente
if [ $? -eq 0 ]; then
echo "El clúster '$CLUSTER_NAME' ha sido eliminado correctamente."
else
Expand Down

0 comments on commit acda4f8

Please sign in to comment.