Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cloud-native/aks-arm/NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# NOTES

https://azure.github.io/Azure-Verified-Modules/indexes/bicep/bicep-resource-modules/

https://github.com/Azure/bicep-registry-modules/tree/main/avm/res/container-service/managed-cluster#example-3-using-only-defaults

https://techcommunity.microsoft.com/blog/linuxandopensourceblog/azure-linux-3-0-now-in-preview-on-azure-kubernetes-service-v1-31/4287229
55 changes: 55 additions & 0 deletions cloud-native/aks-arm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Azure Kubernetes Service (AKS)

## Prerequisites

- Azure CLI
- Bicep
- Azure Subscription

## Deploy

Azure Linux V3 Preview feature registration:

```bash
az feature register \
--namespace Microsoft.ContainerService \
--name AzureLinuxV3Preview
```

```bash
az feature show \
--namespace Microsoft.ContainerService \
--name AzureLinuxV3Preview
```

```bash
az provider register \
-n Microsoft.ContainerService
```

Create resource group:

```bash
az group create \
--name 250100-aks \
--location eastus
```

Deploy Azure Kubernetes Service (AKS) cluster:

```bash
az deployment group create \
--resource-group 250100-aks \
--template-file cloud-native/aks-arm/aks.bicep
```

## Cleanup

Deploy the empty Bicep template:

```bash
az deployment group create \
--resource-group 250100-aks \
--mode Complete \
--template-file cloud-native/aks-arm/empty.bicep
```
47 changes: 47 additions & 0 deletions cloud-native/aks-arm/aks.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
param location string = resourceGroup().location

var managedIdentityName = '${resourceGroup().name}-identity'

resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
name: managedIdentityName
location: location
}

module managedCluster 'br/public:avm/res/container-service/managed-cluster:0.6.2' = {
name: 'managedClusterDeployment'
params: {
// Required parameters
name: 'aks-1'
kubernetesVersion: '1.31.2'
primaryAgentPoolProfiles: [
{
count: 1
mode: 'System'
name: 'systempool'
osSKU: 'AzureLinux'
vmSize: 'Standard_D2pds_v6'
orchestratorVersion: '1.31.2'
}
{
count: 1
mode: 'User'
name: 'pool1'
osSKU: 'AzureLinux'
vmSize: 'Standard_D2pds_v6'
orchestratorVersion: '1.31.2'
}
]
// Non-required parameters
location: location
aadProfile: {
aadProfileEnableAzureRBAC: true
aadProfileManaged: true
}
disableLocalAccounts: true
managedIdentities: {
userAssignedResourceIds: [
managedIdentity.id
]
}
}
}
Empty file.