Skip to content

Commit

Permalink
Merge pull request #1335 from huone1/optimize/create-cluster.sh
Browse files Browse the repository at this point in the history
set the kindest/node default version to v1.22.0 in create-cluster.sh
  • Loading branch information
karmada-bot authored Feb 7, 2022
2 parents 0d4baeb + d78d44d commit 2ab22fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hack/create-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ function usage() {
echo "Example: hack/create-cluster.sh host /root/.kube/karmada.config"
}

CLUSTER_VERSION=${CLUSTER_VERSION:-"kindest/node:v1.22.0"}

if [[ $# -lt 1 ]]; then
usage
exit 1
Expand Down Expand Up @@ -86,7 +88,7 @@ sed -i'' -e "s#{{disable_cni}}#true#g" "${TEMP_PATH}"/"${CLUSTER_NAME}"-config.y
sed -i'' -e "s#{{pod_cidr}}#${POD_CIDR}#g" "${TEMP_PATH}"/"${CLUSTER_NAME}"-config.yaml
sed -i'' -e "s#{{service_cidr}}#${SERVICE_CIDR}#g" "${TEMP_PATH}"/"${CLUSTER_NAME}"-config.yaml

kind create cluster --name "${CLUSTER_NAME}" --kubeconfig="${KUBECONFIG}" --config="${TEMP_PATH}"/"${CLUSTER_NAME}"-config.yaml
kind create cluster --name "${CLUSTER_NAME}" --kubeconfig="${KUBECONFIG}" --image="${CLUSTER_VERSION}" --config="${TEMP_PATH}"/"${CLUSTER_NAME}"-config.yaml

# Kind cluster's context name contains a "kind-" prefix by default.
# Change context name to cluster name.
Expand Down

0 comments on commit 2ab22fa

Please sign in to comment.