From e58a16e95a038e4cd1eaae0be8610a083284e656 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Wed, 15 Jun 2016 23:53:57 -0400 Subject: [PATCH] AWS kube-down: Issue warning if VPC not found Issue #17219 --- cluster/aws/util.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cluster/aws/util.sh b/cluster/aws/util.sh index 80170c5f274..3a3d7c759be 100755 --- a/cluster/aws/util.sh +++ b/cluster/aws/util.sh @@ -1501,6 +1501,16 @@ function kube-down { echo "Deleting VPC: ${vpc_id}" $AWS_CMD delete-vpc --vpc-id $vpc_id > $LOG + else + echo "" >&2 + echo -e "${color_red}Cluster NOT deleted!${color_norm}" >&2 + echo "" >&2 + echo "No VPC was found with tag KubernetesCluster=${CLUSTER_ID}" >&2 + echo "" >&2 + echo "If you are trying to delete a cluster in a shared VPC," >&2 + echo "please consider using one of the methods in the kube-deploy repo." >&2 + echo "See: https://github.com/kubernetes/kube-deploy/blob/master/docs/delete_cluster.md" >&2 + exit 1 fi }