Skip to content

Instantly share code, notes, and snippets.

@dirien
Last active June 13, 2023 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dirien/b711a14e6c4fe89c86153b3eb99a0807 to your computer and use it in GitHub Desktop.
Save dirien/b711a14e6c4fe89c86153b3eb99a0807 to your computer and use it in GitHub Desktop.
AKS update
param location string = resourceGroup().location
param resourceGroupName string = resourceGroup().name
param kubernetesVersion string = '1.24.9'
param agentKubernetesVersion string = '1.24.9'
resource aks 'Microsoft.ContainerService/managedClusters@2023-03-01' = {
name: 'my-bicep-aks'
location: location
identity: {
type: 'SystemAssigned'
}
properties: {
kubernetesVersion: kubernetesVersion
nodeResourceGroup: 'my-bicep-aks-nodes'
dnsPrefix: resourceGroupName
networkProfile: {
networkPlugin: 'azure'
networkPolicy: 'calico'
}
oidcIssuerProfile: {
enabled: true
}
agentPoolProfiles: [
{
name: 'default'
count: 3
vmSize: 'Standard_B2ms'
osType: 'Linux'
osDiskSizeGB: 30
type: 'VirtualMachineScaleSets'
mode: 'System'
orchestratorVersion: agentKubernetesVersion
}
]
}
}
resource workloadpool 'Microsoft.ContainerService/managedClusters/agentPools@2023-03-01' = {
parent: aks
name: 'workloadpool'
properties: {
count: 3
vmSize: 'Standard_B2ms'
osType: 'Linux'
osDiskSizeGB: 30
type: 'VirtualMachineScaleSets'
//mode: 'System'
orchestratorVersion: agentKubernetesVersion
}
}
param location string = resourceGroup().location
param resourceGroupName string = resourceGroup().name
resource aks 'Microsoft.ContainerService/managedClusters@2023-03-01' existing = {
name: 'aks'
}
param newKubernetesVersion string = '1.24.10'
resource variables_cluster 'Microsoft.ContainerService/managedClusters@2023-03-01' = {
name: 'my-bicep-aks'
location: location
properties: {
id: aks.id
kubernetesVersion: newKubernetesVersion
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment