Skip to content

Commit aab9b73

Browse files
authored
Merge pull request #276687 from RichardChen820/user/junbchen/bicepInstallation
Add bicep installation for App Configuration extension
2 parents a10efa3 + 29189bd commit aab9b73

File tree

1 file changed

+91
-0
lines changed

1 file changed

+91
-0
lines changed

articles/aks/azure-app-configuration.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ Create the Azure App Configuration extension, which installs Azure App Configura
6363

6464
For example, install the latest version of Azure App Configuration Kubernetes Provider via the Azure App Configuration extension on your AKS cluster:
6565

66+
### [Azure CLI](#tab/cli)
67+
6668
```azurecli
6769
az k8s-extension create --cluster-type managedClusters \
6870
--cluster-name myAKSCluster \
@@ -72,20 +74,71 @@ az k8s-extension create --cluster-type managedClusters \
7274
--release-train preview
7375
```
7476

77+
### [Bicep](#tab/bicep)
78+
79+
Create a Bicep template using the following example.
80+
81+
```bicep
82+
@description('The name of the Managed Cluster resource.')
83+
param clusterName string
84+
85+
resource existingManagedCluster 'Microsoft.ContainerService/managedClusters@2024-02-01' existing = {
86+
name: clusterName
87+
}
88+
89+
resource appConfigExtension 'Microsoft.KubernetesConfiguration/extensions@2022-11-01' = {
90+
name: 'appconfigurationkubernetesprovider'
91+
scope: existingManagedCluster
92+
properties: {
93+
autoUpgradeMinorVersion: true
94+
configurationSettings: {
95+
'global.clusterType': 'managedclusters'
96+
}
97+
extensionType: 'microsoft.appconfiguration'
98+
releaseTrain: 'preview'
99+
}
100+
}
101+
```
102+
103+
Deploy the Bicep template using the `az deployment group` command.
104+
105+
```azurecli
106+
az deployment group create \
107+
--resource-group myResourceGroup \
108+
--template-file ./my-bicep-file-path.bicep \
109+
--parameters clusterName=myAKSCluster
110+
```
111+
112+
---
113+
75114
### Configure automatic updates
76115

77116
If you create Azure App Configuration extension without specifying a version, `--auto-upgrade-minor-version` *is automatically enabled*, configuring the Azure App Configuration extension to automatically update its minor version on new releases.
78117

79118
You can disable auto update by specifying the `--auto-upgrade-minor-version` parameter and setting the value to `false`.
80119

120+
#### [Azure CLI](#tab/cli)
121+
81122
```azurecli
82123
--auto-upgrade-minor-version false
83124
```
84125

126+
#### [Bicep](#tab/bicep)
127+
128+
```bicep
129+
properties {
130+
autoUpgradeMinorVersion: false
131+
}
132+
```
133+
134+
---
135+
85136
### Targeting a specific version
86137

87138
The same command-line argument is used for installing a specific version of Azure App Configuration Kubernetes Provider or rolling back to a previous version. Set `--auto-upgrade-minor-version` to `false` and `--version` to the version of Azure App Configuration Kubernetes Provider you wish to install. If the `version` parameter is omitted, the extension installs the latest version.
88139

140+
#### [Azure CLI](#tab/cli)
141+
89142
```azurecli
90143
az k8s-extension create --cluster-type managedClusters \
91144
--cluster-name myAKSCluster \
@@ -97,6 +150,44 @@ az k8s-extension create --cluster-type managedClusters \
97150
--version 2.0.0-preview
98151
```
99152

153+
#### [Bicep](#tab/bicep)
154+
155+
Create a Bicep template using the following example.
156+
157+
```bicep
158+
@description('The name of the Managed Cluster resource.')
159+
param clusterName string
160+
161+
resource existingManagedCluster 'Microsoft.ContainerService/managedClusters@2024-02-01' existing = {
162+
name: clusterName
163+
}
164+
165+
resource appConfigExtension 'Microsoft.KubernetesConfiguration/extensions@2022-11-01' = {
166+
name: 'appconfigurationkubernetesprovider'
167+
scope: existingManagedCluster
168+
properties: {
169+
autoUpgradeMinorVersion: false
170+
configurationSettings: {
171+
'global.clusterType': 'managedclusters'
172+
}
173+
extensionType: 'microsoft.appconfiguration'
174+
releaseTrain: 'preview'
175+
version: '2.0.0-preview'
176+
}
177+
}
178+
```
179+
180+
Deploy the Bicep template using the `az deployment group` command.
181+
182+
```azurecli
183+
az deployment group create \
184+
--resource-group myResourceGroup \
185+
--template-file ./my-bicep-file-path.bicep \
186+
--parameters clusterName=myAKSCluster
187+
```
188+
189+
---
190+
100191
## Extension versions
101192

102193
The Azure App Configuration extension supports the following version of Azure App Configuration Kubernetes Provider:

0 commit comments

Comments
 (0)