Skip to content

Commit 7decfd3

Browse files
App Configuration K8s provider add installation method
1 parent d41292b commit 7decfd3

File tree

1 file changed

+55
-8
lines changed

1 file changed

+55
-8
lines changed

articles/azure-app-configuration/quickstart-azure-kubernetes-service.md

Lines changed: 55 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,22 +226,57 @@ Add following key-values to the App Configuration store and leave **Label** and
226226
|Settings:Message|*Hello from Azure App Configuration*|
227227
228228
### Set up the App Configuration Kubernetes Provider
229+
229230
1. Run the following command to get access credentials for your AKS cluster. Replace the value of the `name` and `resource-group` parameters with your AKS instance:
230231
231232
```console
232233
az aks get-credentials --name <your-aks-instance-name> --resource-group <your-aks-resource-group>
233234
```
234235
235-
1. Install Azure App Configuration Kubernetes Provider to your AKS cluster using `helm`:
236+
2. Install Azure App Configuration Kubernetes Provider to your AKS cluster:
236237
238+
#### [helm](#tab/helm)
239+
240+
Run the following command to install the helm chart.
241+
237242
```console
238243
helm install azureappconfiguration.kubernetesprovider \
239-
oci://mcr.microsoft.com/azure-app-configuration/helmchart/kubernetes-provider \
240-
--namespace azappconfig-system \
241-
--create-namespace
244+
oci://mcr.microsoft.com/azure-app-configuration/helmchart/kubernetes-provider \
245+
--namespace azappconfig-system \
246+
--create-namespace
247+
```
248+
249+
#### [Azure CLI](#tab/cli)
250+
251+
Run the following commands to install the Azure App Configuration Kubernetes Provider as the [AKS extension](../aks/azure-app-configuration.md).
252+
253+
254+
1. Install the `k8s-extension` Azure CLI extension:
255+
256+
```azurecli
257+
az extension add --name k8s-extension
258+
```
259+
260+
2. Register the provider using the [az provider register](/cli/azure/provider#az-provider-register):
261+
262+
```azurecli
263+
az provider register --namespace Microsoft.KubernetesConfiguration
264+
```
265+
266+
3. Install the Azure App Configuration AKS extension:
267+
268+
```azurecli
269+
az k8s-extension create --cluster-type managedClusters \
270+
--cluster-name <your-aks-instance-name> \
271+
--resource-group <your-aks-resource-group> \
272+
--name appconfigurationkubernetesprovider \
273+
--extension-type Microsoft.AppConfiguration \
274+
--release-train preview
242275
```
243276
244-
1. Add an *appConfigurationProvider.yaml* file to the *Deployment* directory with the following content to create an `AzureAppConfigurationProvider` resource. `AzureAppConfigurationProvider` is a custom resource that defines what data to download from an Azure App Configuration store and creates a ConfigMap.
277+
---
278+
279+
3. Add an *appConfigurationProvider.yaml* file to the *Deployment* directory with the following content to create an `AzureAppConfigurationProvider` resource. `AzureAppConfigurationProvider` is a custom resource that defines what data to download from an Azure App Configuration store and creates a ConfigMap.
245280
246281
```yaml
247282
apiVersion: azconfig.io/v1
@@ -269,7 +304,7 @@ Add following key-values to the App Configuration store and leave **Label** and
269304
> - The ConfigMap will be reset based on the present data in your App Configuration store if it's deleted or modified by any other means.
270305
> - The ConfigMap will be deleted if the App Configuration Kubernetes Provider is uninstalled.
271306
272-
2. Update the *deployment.yaml* file in the *Deployment* directory to use the ConfigMap `configmap-created-by-appconfig-provider` as a mounted data volume. It is important to ensure that the `volumeMounts.mountPath` matches the `WORKDIR` specified in your *Dockerfile* and the *config* directory created before.
307+
4. Update the *deployment.yaml* file in the *Deployment* directory to use the ConfigMap `configmap-created-by-appconfig-provider` as a mounted data volume. It is important to ensure that the `volumeMounts.mountPath` matches the `WORKDIR` specified in your *Dockerfile* and the *config* directory created before.
273308
274309
```yaml
275310
apiVersion: apps/v1
@@ -302,13 +337,13 @@ Add following key-values to the App Configuration store and leave **Label** and
302337
name: configmap-created-by-appconfig-provider
303338
```
304339
305-
3. Run the following command to deploy the changes. Replace the namespace if you are using your existing AKS application.
340+
5. Run the following command to deploy the changes. Replace the namespace if you are using your existing AKS application.
306341
307342
```console
308343
kubectl apply -f ./Deployment -n appconfig-demo
309344
```
310345
311-
4. Refresh the browser. The page shows updated content.
346+
6. Refresh the browser. The page shows updated content.
312347
313348
![Screenshot showing Kubernetes Provider after using configMap.](./media/quickstarts/kubernetes-provider-app-launch-after.png)
314349
@@ -352,11 +387,23 @@ Use the logs for further troubleshooting. For example, if you see requests to yo
352387
## Clean up resources
353388

354389
Uninstall the App Configuration Kubernetes Provider from your AKS cluster if you want to keep the AKS cluster.
390+
### [helm](#tab/helm)
355391

356392
```console
357393
helm uninstall azureappconfiguration.kubernetesprovider --namespace azappconfig-system
358394
```
359395

396+
### [Azure CLI](#tab/cli)
397+
398+
```azurecli
399+
az k8s-extension delete --cluster-type managedClusters \
400+
--cluster-name <your-aks-instance-name> \
401+
--resource-group <your-aks-resource-group> \
402+
--name appconfigurationkubernetesprovider
403+
```
404+
405+
---
406+
360407
[!INCLUDE[Azure App Configuration cleanup](../../includes/azure-app-configuration-cleanup.md)]
361408

362409
> [!NOTE]

0 commit comments

Comments
 (0)