Skip to content

Commit d98561f

Browse files
committed
fix local-up-cluster.sh to fail
1 parent b85a834 commit d98561f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hack/local-up-cluster.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ function start_dns_addon {
10391039
${SED} -i -e "s/dns_memory_limit/${DNS_MEMORY_LIMIT}/g" dns.yaml
10401040
# TODO update to dns role once we have one.
10411041
# use kubectl to create dns addon
1042-
if ${KUBECTL} --kubeconfig="${CERT_DIR}/admin.kubeconfig" --namespace=kube-system create -f dns.yaml ; then
1042+
if ${KUBECTL} --kubeconfig="${CERT_DIR}/admin.kubeconfig" --namespace=kube-system apply -f dns.yaml ; then
10431043
echo "${DNS_ADDON} addon successfully deployed."
10441044
else
10451045
echo "Something is wrong with your DNS input"
@@ -1058,7 +1058,7 @@ function start_nodelocaldns {
10581058
${SED} -i -e "s/__PILLAR__LOCAL__DNS__/${LOCAL_DNS_IP}/g" nodelocaldns.yaml
10591059

10601060
# use kubectl to create nodelocaldns addon
1061-
${KUBECTL} --kubeconfig="${CERT_DIR}/admin.kubeconfig" --namespace=kube-system create -f nodelocaldns.yaml
1061+
${KUBECTL} --kubeconfig="${CERT_DIR}/admin.kubeconfig" --namespace=kube-system apply -f nodelocaldns.yaml
10621062
echo "NodeLocalDNS addon successfully deployed."
10631063
rm nodelocaldns.yaml
10641064
}
@@ -1085,7 +1085,7 @@ function create_storage_class {
10851085

10861086
if [ -e "${CLASS_FILE}" ]; then
10871087
echo "Create default storage class for ${CLOUD_PROVIDER}"
1088-
${KUBECTL} --kubeconfig="${CERT_DIR}/admin.kubeconfig" create -f "${CLASS_FILE}"
1088+
${KUBECTL} --kubeconfig="${CERT_DIR}/admin.kubeconfig" apply -f "${CLASS_FILE}"
10891089
else
10901090
echo "No storage class available for ${CLOUD_PROVIDER}."
10911091
fi

0 commit comments

Comments
 (0)