Skip to content

Commit

Permalink
adding nsg to default subnet
Browse files Browse the repository at this point in the history
  • Loading branch information
smritidahal653 committed Jul 12, 2024
1 parent 4e85790 commit a9bc553
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
17 changes: 11 additions & 6 deletions hack/e2e/aks-addon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,19 @@ az network nsg create \
--resource-group $RESOURCE_GROUP \
--name $NSG_NAME

aci_subnet_id="$(az network vnet subnet create \
az network vnet subnet update \
--resource-group $RESOURCE_GROUP \
--vnet-name $VNET_NAME \
--name $CLUSTER_SUBNET_NAME \
--network-security-group $NSG_NAME

az network vnet subnet create \
--resource-group $RESOURCE_GROUP \
--vnet-name $VNET_NAME \
--network-security-group $NSG_NAME \
--name $ACI_SUBNET_NAME \
--address-prefix $ACI_SUBNET_CIDR \
--query id -o tsv)"

--address-prefix $ACI_SUBNET_CIDR

cluster_subnet_id="$(az network vnet subnet show \
--resource-group $RESOURCE_GROUP \
--vnet-name $VNET_NAME \
Expand All @@ -120,7 +125,7 @@ az aks create \
-g "$RESOURCE_GROUP" \
-l "$LOCATION" \
-c "$NODE_COUNT" \
--node-vm-size standard_ds3_v2 \
--node-vm-size standard_d8_v3 \
-n "$CLUSTER_NAME" \
--network-plugin azure \
--vnet-subnet-id "$cluster_subnet_id" \
Expand All @@ -134,7 +139,7 @@ az aks create \
-g "$RESOURCE_GROUP" \
-l "$LOCATION" \
-c "$NODE_COUNT" \
--node-vm-size standard_ds3_v2 \
--node-vm-size standard_d8_v3 \
-n "$CLUSTER_NAME" \
--network-plugin azure \
--vnet-subnet-id "$cluster_subnet_id" \
Expand Down
6 changes: 6 additions & 0 deletions hack/e2e/aks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ az network nsg create \
--resource-group $RESOURCE_GROUP \
--name $NSG_NAME

az network vnet subnet update \
--resource-group $RESOURCE_GROUP \
--vnet-name $VNET_NAME \
--name $CLUSTER_SUBNET_NAME \
--network-security-group $NSG_NAME

aci_subnet_id="$(az network vnet subnet create \
--resource-group $RESOURCE_GROUP \
--vnet-name $VNET_NAME \
Expand Down

0 comments on commit a9bc553

Please sign in to comment.