This repository was archived by the owner on Jul 19, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 5858 [ " ${CLUSTER_PRIVATE_SUBNETS} " != " " ] && eksctl_args+=( --vpc-private-subnets=" ${CLUSTER_PRIVATE_SUBNETS} " )
5959
6060 eksctl create cluster " ${cluster_name} " " ${eksctl_args[@]} " --dry-run > generated-cluster.yaml
61- yq w -i " . managedNodeGroups[0].disableIMDSv1 = true" generated-cluster.yaml
61+ yq w -i generated-cluster.yaml managedNodeGroups[0].disableIMDSv1 true
6262
6363 eksctl create cluster -f generated-cluster.yaml --auto-kubeconfig --timeout=40m
6464
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ CLUSTER_NAME=${DEPLOYMENT_NAME}-cluster
2929CLUSTER_REGION=${CLUSTER_REGION:- cn-northwest-1}
3030OIDC_ROLE_NAME=pod-role-$DEPLOYMENT_NAME
3131AWS_ACC_NUM=$( aws sts get-caller-identity --region $CLUSTER_REGION --query Account --output text)
32+ CLUSTER_VERSION=1.21
3233
3334function download_installer_china(){
3435 if [ -f ./installer_china.yaml ]; then
@@ -57,12 +58,12 @@ function download_installer_china(){
5758}
5859
5960function create_eks_cluster() {
60- eksctl_args=( --managed --nodes 1 --node-type=c5.xlarge --region " $CLUSTER_REGION " )
61+ eksctl_args=( --managed --nodes 1 --node-type=c5.xlarge --region " $CLUSTER_REGION " --version " ${CLUSTER_VERSION} " )
6162 [ ! -z " ${USE_EXISTING_SUBNET} " ] && eksctl_args+=( --vpc-public-subnets=" ${EKS_PUBLIC_SUBNET_1} ,${EKS_PUBLIC_SUBNET_2} " )
6263 [ ! -z " ${USE_EXISTING_SUBNET} " ] && eksctl_args+=( --vpc-private-subnets=" ${EKS_PRIVATE_SUBNET_1} ,${EKS_PRIVATE_SUBNET_2} " )
6364
6465 eksctl create cluster " ${CLUSTER_NAME} " " ${eksctl_args[@]} " --dry-run > generated-cluster.yaml
65- yq w -i " . managedNodeGroups[0].disableIMDSv1 = true" generated-cluster.yaml
66+ yq w -i generated-cluster.yaml managedNodeGroups[0].disableIMDSv1 true
6667
6768 eksctl create cluster -f generated-cluster.yaml --auto-kubeconfig --timeout=40m
6869}
You can’t perform that action at this time.
0 commit comments