@@ -8,13 +8,15 @@ AZIMG = mcr.microsoft.com/azure-cli
88AZCLI ?= docker run --rm -v $(AZCFG ) :/root/.azure -v $(KUBECFG ) :/root/.kube -v $(SSH ) :/root/.ssh -v $(PWD ) :/root/tmpsrc $(AZIMG ) az
99
1010# overrideable defaults
11- REGION ?= westus2
11+ AUTOUPGRADE ?= patch
12+ K8S_VER ?= 1.25 # Used only for ubuntu 18 as K8S 1.24.9, as K8S > 1.25 have Ubuntu 22
13+ NODE_COUNT ?= 2
14+ NODEUPGRADE ?= NodeImage
1215OS_SKU ?= Ubuntu
13- WINDOWS_OS_SKU ?= Windows2022
16+ OS_SKU_WIN ?= Windows2022
17+ REGION ?= westus2
1418VM_SIZE ?= Standard_B2s
15- NODE_COUNT ?= 2
16- K8S_VER ?= 1.25 # Used only for ubuntu 18 as K8S 1.24.9, as K8S > 1.25 have Ubuntu 22
17- WINDOWS_VM_SKU ?= Standard_B2s
19+ VM_SIZE_WIN ?= Standard_B2s
1820
1921# overrideable variables
2022SUB ?= $(AZURE_SUBSCRIPTION )
@@ -88,6 +90,8 @@ up: swift-up ## Alias to swift-up
8890
8991overlay-byocni-up : rg-up overlay-net-up # # Brings up an Overlay BYO CNI cluster
9092 $(AZCLI ) aks create -n $(CLUSTER ) -g $(GROUP ) -l $(REGION ) \
93+ --auto-upgrade-channel $(AUTOUPGRADE ) \
94+ --node-os-upgrade-channel $(NODEUPGRADE ) \
9195 --node-count $(NODE_COUNT ) \
9296 --node-vm-size $(VM_SIZE ) \
9397 --load-balancer-sku basic \
@@ -101,6 +105,8 @@ overlay-byocni-up: rg-up overlay-net-up ## Brings up an Overlay BYO CNI cluster
101105
102106overlay-byocni-nokubeproxy-up : rg-up overlay-net-up # # Brings up an Overlay BYO CNI cluster without kube-proxy
103107 $(AZCLI ) aks create -n $(CLUSTER ) -g $(GROUP ) -l $(REGION ) \
108+ --auto-upgrade-channel $(AUTOUPGRADE ) \
109+ --node-os-upgrade-channel $(NODEUPGRADE ) \
104110 --node-count $(NODE_COUNT ) \
105111 --node-vm-size $(VM_SIZE ) \
106112 --load-balancer-sku basic \
@@ -115,6 +121,8 @@ overlay-byocni-nokubeproxy-up: rg-up overlay-net-up ## Brings up an Overlay BYO
115121
116122overlay-cilium-up : rg-up overlay-net-up # # Brings up an Overlay Cilium cluster
117123 $(AZCLI ) aks create -n $(CLUSTER ) -g $(GROUP ) -l $(REGION ) \
124+ --auto-upgrade-channel $(AUTOUPGRADE ) \
125+ --node-os-upgrade-channel $(NODEUPGRADE ) \
118126 --node-count $(NODE_COUNT ) \
119127 --node-vm-size $(VM_SIZE ) \
120128 --load-balancer-sku basic \
@@ -129,6 +137,8 @@ overlay-cilium-up: rg-up overlay-net-up ## Brings up an Overlay Cilium cluster
129137
130138overlay-up : rg-up overlay-net-up # # Brings up an Overlay AzCNI cluster
131139 $(AZCLI ) aks create -n $(CLUSTER ) -g $(GROUP ) -l $(REGION ) \
140+ --auto-upgrade-channel $(AUTOUPGRADE ) \
141+ --node-os-upgrade-channel $(NODEUPGRADE ) \
132142 --node-count $(NODE_COUNT ) \
133143 --node-vm-size $(VM_SIZE ) \
134144 --load-balancer-sku basic \
@@ -142,6 +152,8 @@ overlay-up: rg-up overlay-net-up ## Brings up an Overlay AzCNI cluster
142152
143153swift-byocni-up : rg-up swift-net-up # # Bring up a SWIFT BYO CNI cluster
144154 $(AZCLI ) aks create -n $(CLUSTER ) -g $(GROUP ) -l $(REGION ) \
155+ --auto-upgrade-channel $(AUTOUPGRADE ) \
156+ --node-os-upgrade-channel $(NODEUPGRADE ) \
145157 --node-count $(NODE_COUNT ) \
146158 --node-vm-size $(VM_SIZE ) \
147159 --load-balancer-sku basic \
@@ -155,6 +167,8 @@ swift-byocni-up: rg-up swift-net-up ## Bring up a SWIFT BYO CNI cluster
155167
156168swift-byocni-nokubeproxy-up : rg-up swift-net-up # # Bring up a SWIFT BYO CNI cluster without kube-proxy
157169 $(AZCLI ) aks create -n $(CLUSTER ) -g $(GROUP ) -l $(REGION ) \
170+ --auto-upgrade-channel $(AUTOUPGRADE ) \
171+ --node-os-upgrade-channel $(NODEUPGRADE ) \
158172 --node-count $(NODE_COUNT ) \
159173 --node-vm-size $(VM_SIZE ) \
160174 --load-balancer-sku basic \
@@ -169,6 +183,8 @@ swift-byocni-nokubeproxy-up: rg-up swift-net-up ## Bring up a SWIFT BYO CNI clus
169183
170184swift-cilium-up : rg-up swift-net-up # # Bring up a SWIFT Cilium cluster
171185 $(AZCLI ) aks create -n $(CLUSTER ) -g $(GROUP ) -l $(REGION ) \
186+ --auto-upgrade-channel $(AUTOUPGRADE ) \
187+ --node-os-upgrade-channel $(NODEUPGRADE ) \
172188 --node-count $(NODE_COUNT ) \
173189 --node-vm-size $(VM_SIZE ) \
174190 --load-balancer-sku basic \
@@ -183,6 +199,8 @@ swift-cilium-up: rg-up swift-net-up ## Bring up a SWIFT Cilium cluster
183199
184200swift-up : rg-up swift-net-up # # Bring up a SWIFT AzCNI cluster
185201 $(AZCLI ) aks create -n $(CLUSTER ) -g $(GROUP ) -l $(REGION ) \
202+ --auto-upgrade-channel $(AUTOUPGRADE ) \
203+ --node-os-upgrade-channel $(NODEUPGRADE ) \
186204 --node-count $(NODE_COUNT ) \
187205 --node-vm-size $(VM_SIZE ) \
188206 --load-balancer-sku basic \
@@ -195,6 +213,8 @@ swift-up: rg-up swift-net-up ## Bring up a SWIFT AzCNI cluster
195213
196214windows-cniv1-up : rg-up overlay-net-up # # Bring up a Windows CNIv1 cluster
197215 $(AZCLI ) aks create -n $(CLUSTER ) -g $(GROUP ) -l $(REGION ) \
216+ --auto-upgrade-channel $(AUTOUPGRADE ) \
217+ --node-os-upgrade-channel $(NODEUPGRADE ) \
198218 --node-count $(NODE_COUNT ) \
199219 --node-vm-size $(VM_SIZE ) \
200220 --network-plugin azure \
@@ -208,6 +228,8 @@ windows-cniv1-up: rg-up overlay-net-up ## Bring up a Windows CNIv1 cluster
208228
209229linux-cniv1-up : rg-up overlay-net-up # # Bring up a Linux CNIv1 cluster
210230 $(AZCLI ) aks create -n $(CLUSTER ) -g $(GROUP ) -l $(REGION ) \
231+ --auto-upgrade-channel $(AUTOUPGRADE ) \
232+ --node-os-upgrade-channel $(NODEUPGRADE ) \
211233 --node-count $(NODE_COUNT ) \
212234 --node-vm-size $(VM_SIZE ) \
213235 --max-pods 250 \
@@ -222,6 +244,8 @@ linux-cniv1-up: rg-up overlay-net-up ## Bring up a Linux CNIv1 cluster
222244
223245dualstack-overlay-up : rg-up overlay-net-up # # Brings up an dualstack Overlay cluster with Linux node only
224246 $(AZCLI ) aks create -n $(CLUSTER ) -g $(GROUP ) -l $(REGION ) \
247+ --auto-upgrade-channel $(AUTOUPGRADE ) \
248+ --node-os-upgrade-channel $(NODEUPGRADE ) \
225249 --node-count $(NODE_COUNT ) \
226250 --node-vm-size $(VM_SIZE ) \
227251 --network-plugin azure \
@@ -236,6 +260,8 @@ dualstack-overlay-up: rg-up overlay-net-up ## Brings up an dualstack Overlay clu
236260
237261dualstack-overlay-byocni-up : rg-up overlay-net-up # # Brings up an dualstack Overlay BYO CNI cluster
238262 $(AZCLI ) aks create -n $(CLUSTER ) -g $(GROUP ) -l $(REGION ) \
263+ --auto-upgrade-channel $(AUTOUPGRADE ) \
264+ --node-os-upgrade-channel $(NODEUPGRADE ) \
239265 --node-count $(NODE_COUNT ) \
240266 --node-vm-size $(VM_SIZE ) \
241267 --network-plugin none \
@@ -251,10 +277,10 @@ dualstack-overlay-byocni-up: rg-up overlay-net-up ## Brings up an dualstack Over
251277windows-nodepool-up : # # Add windows node pool
252278 $(AZCLI ) aks nodepool add -g $(GROUP ) -n npwin \
253279 --node-count $(NODE_COUNT ) \
254- --node-vm-size $(VM_SIZE ) \
280+ --node-vm-size $(VM_SIZE_WIN ) \
255281 --cluster-name $(CLUSTER ) \
256282 --os-type Windows \
257- --os-sku $(WINDOWS_OS_SKU ) \
283+ --os-sku $(OS_SKU_WIN ) \
258284 --max-pods 250 \
259285 --subscription $(SUB )
260286 @$(MAKE ) set-kubeconf
0 commit comments