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 +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -53,11 +53,14 @@ cluster_name="sagemaker-k8s-canary-"$(date '+%Y-%m-%d-%H-%M-%S')""
5353
5454if [ -z " ${USE_EXISTING_CLUSTER} " ]
5555then
56- eksctl_args=( --nodes 1 --node-type=c5.xlarge --timeout=40m -- region " ${CLUSTER_REGION} " --auto-kubeconfig --version " ${CLUSTER_VERSION} " )
56+ eksctl_args=( --nodes 1 --node-type=c5.xlarge --region " ${CLUSTER_REGION} " --version " ${CLUSTER_VERSION} " )
5757 [ " ${CLUSTER_PUBLIC_SUBNETS} " != " " ] && eksctl_args+=( --vpc-public-subnets=" ${CLUSTER_PUBLIC_SUBNETS} " )
5858 [ " ${CLUSTER_PRIVATE_SUBNETS} " != " " ] && eksctl_args+=( --vpc-private-subnets=" ${CLUSTER_PRIVATE_SUBNETS} " )
59+
60+ eksctl create cluster " ${cluster_name} " " ${eksctl_args[@]} " --dry-run > generated-cluster.yaml
61+ yq -i " .managedNodeGroups[0].disableIMDSv1 = true" generated-cluster.yaml
5962
60- eksctl create cluster " ${cluster_name} " " ${eksctl_args[@]} " --enable-ssm
63+ eksctl create cluster -f generated-cluster.yaml --auto-kubeconfig --timeout=40m
6164
6265 echo " Setting kubeconfig"
6366 export KUBECONFIG=" /root/.kube/eksctl/clusters/${cluster_name} "
Original file line number Diff line number Diff line change @@ -57,11 +57,14 @@ function download_installer_china(){
5757}
5858
5959function create_eks_cluster() {
60- eksctl_args=( --managed --nodes 1 --node-type=c5.xlarge --timeout=30m -- region " $CLUSTER_REGION " --auto-kubeconfig )
60+ eksctl_args=( --managed --nodes 1 --node-type=c5.xlarge --region " $CLUSTER_REGION " )
6161 [ ! -z " ${USE_EXISTING_SUBNET} " ] && eksctl_args+=( --vpc-public-subnets=" ${EKS_PUBLIC_SUBNET_1} ,${EKS_PUBLIC_SUBNET_2} " )
6262 [ ! -z " ${USE_EXISTING_SUBNET} " ] && eksctl_args+=( --vpc-private-subnets=" ${EKS_PRIVATE_SUBNET_1} ,${EKS_PRIVATE_SUBNET_2} " )
63+
64+ eksctl create cluster " ${CLUSTER_NAME} " " ${eksctl_args[@]} " --dry-run > generated-cluster.yaml
65+ yq -i " .managedNodeGroups[0].disableIMDSv1 = true" generated-cluster.yaml
6366
64- eksctl create cluster " $CLUSTER_NAME " " ${eksctl_args[@]} " --enable-ssm
67+ eksctl create cluster -f generated-cluster.yaml --auto-kubeconfig --timeout=40m
6568}
6669
6770function install_k8s_operators() {
You can’t perform that action at this time.
0 commit comments