Cleanup the old configuration file of the cluster (#256)

Signed-off-by: icbc-yangcheng <shineus1996@gmail.com>
This commit is contained in:
yangcheng-icbc 2021-04-15 10:03:13 +08:00 committed by GitHub
parent d4d63038ed
commit 1c49ebc418
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -26,6 +26,11 @@ if [[ -z "${KUBECONFIG}" ]]; then
exit 1
fi
if [ -f "${KUBECONFIG}" ];then
echo "Removing old kubeconfig file."
rm -f ${KUBECONFIG}
fi
kind create cluster --name "${CLUSTER_NAME}" --kubeconfig="${KUBECONFIG}" --wait=120s
# Kind cluster's context name contains a "kind-" prefix by default.