You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-app-configuration/howto-import-export-data.md
+51Lines changed: 51 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -259,6 +259,57 @@ For more optional parameters and examples, go to [az appconfig kv import](/cli/a
259
259
260
260
---
261
261
262
+
### Import data from Azure Kubernetes Service ConfigMaps
263
+
264
+
Follow the steps below to import key-values from Azure Kubernetes Service ConfigMaps. Portal support for this feature is in development, please use Azure CLI to import from AKS.
265
+
266
+
#### [Portal](#tab/azure-portal)
267
+
268
+
The Azure portal support for this feature is in development.
269
+
270
+
#### [Azure CLI](#tab/azure-cli)
271
+
272
+
From the Azure CLI, follow the steps below. If you don't have the Azure CLI installed locally, you can optionally use [Azure Cloud Shell](../cloud-shell/overview.md).
273
+
274
+
1. Enter the import command `az appconfig kv import` and add the following parameters:
| `--name` | Enter the name of the App Configuration store you want to import data to. | `my-app-config-store` |
279
+
| `--source` | Enter `aks` to indicate that you're importing app configuration data from Azure Kubernetes Service. | `aks` |
280
+
| `--aks-cluster` | Enter the Azure Kubernetes Service's ARM ID or use the name of the Azure Kubernetes Service, if it's in the same subscription and resource group as the App Configuration. | `/subscriptions/123/resourceGroups/my-resource-group/providers/Microsoft.ContainerService/managedClusters/my-aks-cluster` or `my-aks-cluster` |
281
+
| `--configmap-namespace`| Enter the namespace of the ConfigMap you want to import. | `default` |
282
+
| `--configmap-name` | Enter the name of the ConfigMap you want to import. | `my-configmap` |
| `--prefix` | Optional. A key prefix is the beginning part of a key-value's "key" property. Prefixes can be used to manage groups of key-values in a configuration store. This prefix will be appended to the front of the "key" property of each imported key-value. | `TestApp:` |
289
+
| `--label` | Optional. Enter a label that will be assigned to your imported key-values. If you don't specify a label, the null label will be assigned to your key-values. | `test` |
290
+
| `--content-type` | Optional. Enter appconfig/kvset or application/json to state that the imported content consists of a Key Vault reference or a JSON file. | `application/json` |
291
+
| `--format` | Optional. Enter yaml, properties, or json to indicate the format of ConfigMap you're importing. | `json` |
292
+
| `--separator` | Optional. The separator is the delimiter for flattening the key-values. It's required for exporting hierarchical structure and will be ignored for property files and feature flags. Select one of the following options: `.`, `,`, `:`, `;`, `/`, `-`, `_`, `—`. | `;` |
293
+
294
+
295
+
To get the value for `--aks-cluster`, use the command `az aks show --resource-group <resource-group> --name <aks-cluster-name>`.
296
+
297
+
Example: import all settings from your AKS Configmap as key-values with the label "test", to your App Configuration store, and add a "TestApp:" prefix.
298
+
299
+
```azurecli
300
+
az appconfig kv import --name my-app-config-store --source aks --aks-cluster /subscriptions/123/resourceGroups/my-resource-group/providers/Microsoft.ContainerService/managedClusters/my-aks-cluster --configmap-namespace default --configmap-name my-configmap --label test --prefix TestApp:
301
+
```
302
+
303
+
1. The command line displays a list of the coming changes. Confirm the import by selecting `y`.
304
+
305
+
:::image type="content" source="./media/import-export/continue-import-aks-prompt.png" alt-text="Screenshot of the CLI. Import from AKS confirmation prompt.":::
306
+
307
+
You imported all settings from your AKS ConfigMap as key-values, assigned them the label "test", and added a "TestApp:" prefix.
308
+
309
+
For more optional parameters and examples, go to [az appconfig kv import](/cli/azure/appconfig/kv?view=azure-cli-latest#az-appconfig-kv-import&preserve-view=true).
310
+
311
+
---
312
+
262
313
## Export data
263
314
264
315
Export writes configuration data stored in App Configuration to another destination. Use the export function, for example, to save data from an App Configuration store to a file that can be embedded in your application code during deployment.
0 commit comments