Skip to content

Commit 8295224

Browse files
Add bicep installation for App Configuration extension
1 parent 9b1dc9d commit 8295224

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

articles/aks/azure-app-configuration.md

Lines changed: 93 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,72 @@ 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 existingManagedClusters 'Microsoft.ContainerService/managedClusters@2023-05-02-preview' existing = {
86+
name: clusterName
87+
}
88+
89+
resource appConfigExtension 'Microsoft.KubernetesConfiguration/extensions@2022-11-01' = {
90+
name: 'appconfigurationkubernetesprovider'
91+
scope: existingManagedClusters
92+
properties: {
93+
autoUpgradeMinorVersion: true
94+
configurationProtectedSettings: {}
95+
configurationSettings: {
96+
'global.clusterType': 'managedclusters'
97+
}
98+
extensionType: 'microsoft.appconfiguration'
99+
releaseTrain: 'preview'
100+
}
101+
}
102+
```
103+
104+
Deploy the Bicep template using the `az deployment group` command.
105+
106+
```azurecli
107+
az deployment group create \
108+
--resource-group myResourceGroup \
109+
--template-file ./my-bicep-file-path.bicep \
110+
--parameters clusterName=myAKSCluster
111+
```
112+
113+
---
114+
75115
### Configure automatic updates
76116

77117
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.
78118

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

121+
#### [Azure CLI](#tab/cli)
122+
81123
```azurecli
82124
--auto-upgrade-minor-version false
83125
```
84126

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

87139
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.
88140

141+
#### [Azure CLI](#tab/cli)
142+
89143
```azurecli
90144
az k8s-extension create --cluster-type managedClusters \
91145
--cluster-name myAKSCluster \
@@ -97,6 +151,45 @@ az k8s-extension create --cluster-type managedClusters \
97151
--version 2.0.0-preview
98152
```
99153

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

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

0 commit comments

Comments
 (0)