mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #27518 from justinsb/kubedown_warn_if_no_vpc
Automatic merge from submit-queue AWS kube-down: Issue warning if VPC not found To address issue #17219
This commit is contained in:
commit
2274359ec1
@ -1501,6 +1501,16 @@ function kube-down {
|
|||||||
|
|
||||||
echo "Deleting VPC: ${vpc_id}"
|
echo "Deleting VPC: ${vpc_id}"
|
||||||
$AWS_CMD delete-vpc --vpc-id $vpc_id > $LOG
|
$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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user