Skip to content

Commit e824ba4

Browse files
Split functions custom containers guidance
1 parent 348554a commit e824ba4

4 files changed

Lines changed: 178 additions & 158 deletions

File tree

articles/container-apps/TOC.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,12 @@ items:
137137
items:
138138
- name: Overview
139139
href: functions-overview.md
140-
- name: Create your Azure functions on Azure Container Apps
140+
- name: Create your Functions app through custom containers
141141
href: functions-container-apps.md
142-
- name: Manage a Functions app through the portal and CLI
142+
- name: Create your Functions app through the portal and CLI
143143
href: functions-usage.md
144+
- name: Manage your Functions app
145+
href: functions-manage.md
144146
- name: Migrate from Functions v1 to v2
145147
href: migrate-functions.md
146148
- name: Run event-driven and batch workloads

articles/container-apps/functions-container-apps.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
title: Create your Azure Functions on Azure Container Apps
3-
description: Get started with Azure Functions on Azure Container Apps by deploying your function app within a Linux image in a container registry.
2+
title: Create your Azure Functions app through custom containers on Azure Container Apps
3+
description: Get started with Azure Functions on Azure Container Apps by deploying your function app within a custom Linux image in a container registry.
44
ms.author: deepganguly
55
author: deepganguly
66
ms.service: azure-container-apps
7-
ms.date: 01/11/2025
7+
ms.date: 01/12/2026
88
ms.topic: quickstart
99
ms.custom: build-2023, devx-track-azurecli, devx-track-extended-java, devx-track-js, devx-track-python, linux-related-content, build-2024, devx-track-ts
1010
zone_pivot_groups: programming-languages-set-functions
1111
---
1212

13-
# Create your Azure Functions on Azure Container Apps
13+
# Create your Azure Functions app custom containers on Azure Container Apps
1414

1515
In this article, you create a function app running in a Linux container and deploy it to an Azure Container Apps environment from a container registry. By deploying to Container Apps, you're able to integrate your function apps into cloud-native microservices. For more information, see [Azure Container Apps hosting of Azure Functions](../azure-functions/functions-container-apps-hosting.md).
1616

@@ -77,9 +77,9 @@ Use these commands to create your required Azure resources:
7777
az storage account create --name <STORAGE_NAME> --location eastus --resource-group AzureFunctionsContainers-rg --sku Standard_LRS --allow-blob-public-access false --allow-shared-key-access false
7878
```
7979
80-
The `az storage account create` command creates the storage account that can only be accessed by using Microsoft Entra-authenticated identities that have been granted permissions to specific resources.
80+
The `az storage account create` command creates the storage account that is only accessible by using Microsoft Entra-authenticated identities that are granted permissions to specific resources.
8181
82-
In the previous example, replace `<STORAGE_NAME>` with a name that is appropriate to you and unique in Azure Storage. Storage names must contain 3 to 24 characters numbers and lowercase letters only. `Standard_LRS` specifies a general-purpose account [supported by Functions](../azure-functions/storage-considerations.md#storage-account-requirements).
82+
In the previous example, replace `<STORAGE_NAME>` with a name that's appropriate to you and unique in Azure Storage. Storage names must contain 3 to 24 characters numbers and lowercase letters only. `Standard_LRS` specifies a general-purpose account [supported by Functions](../azure-functions/storage-considerations.md#storage-account-requirements).
8383
8484
1. Create a managed identity and use the returned `principalId` to grant it both access to your storage account and pull permissions in your registry instance.
8585
@@ -91,7 +91,7 @@ Use these commands to create your required Azure resources:
9191
az role assignment create --assignee-object-id $principalId --assignee-principal-type ServicePrincipal --role "Storage Blob Data Owner" --scope $storageId
9292
```
9393
94-
The `az identity create` command creates a user-assigned managed identity and the `az role assignment create`commands adds your identity to the required roles. Replace `<REGISTRY_NAME>`, `<USER_IDENTITY_NAME>`, and `<STORAGE_NAME>` with the name your existing container registry, the name for your managed identity, and the storage account name, respectively. The managed identity can now be used by an app to access both the storage account and Azure Container Registry without using shared secrets.
94+
The `az identity create` command creates a user-assigned managed identity and the `az role assignment create`commands adds your identity to the required roles. Replace `<REGISTRY_NAME>`, `<USER_IDENTITY_NAME>`, and `<STORAGE_NAME>` with the name your existing container registry, the name for your managed identity, and the storage account name, respectively. The managed identity is now available to the app to access both the storage account and Azure Container Registry without using shared secrets.
9595
9696
## Create and configure a function app on Azure with the image
9797
@@ -136,7 +136,7 @@ az containerapp create --name <APP_NAME> --storage-account <STORAGE_NAME> --envi
136136

137137
In the `az containerapp create --kind=functionapp`command, the `--environment` parameter specifies the Container Apps environment and the `--image` parameter specifies the image to use for the function app. In this example, replace `<STORAGE_NAME>` with the name you used in the previous section for the storage account. Also, replace `<APP_NAME>` with a globally unique name appropriate to you and `<DOCKER_ID>` with your public Docker Hub account ID.
138138

139-
If you're using a private registry, you need to include the fully qualified domain name of your registry instead of just the Docker ID for `<DOCKER_ID>`, along with the `--registry-username` and `--registry-password` credential required to access the registry.
139+
If you're using a private registry, you need to include the fully qualified domain name of your registry instead of just the Docker ID for `<DOCKER_ID>`, along with the `--registry-username` and `--registry-password` credential required to access the registry.
140140

141141
---
142142

@@ -170,21 +170,23 @@ At this point, your functions are running in a Container Apps environment, with
170170
171171
172172
## Verify your functions on Azure
173-
With the image deployed to your function app in Azure, you can now invoke the function through HTTP requests.Get detailed information about a specific function:
173+
With the image deployed to your function app in Azure, you can now invoke the function through HTTP requests. Get detailed information about a specific function:
174174
175175
```azurecli
176176
az containerapp function show \
177177
--resource-group AzureFunctionsContainers-rg \
178178
--name <APP_NAME> \
179179
--function-name HttpExample
180180
```
181-
Replace <APP_NAME> with the name of your function app.Use the URL you just obtained to call the HttpExample function endpoint, appending the query string ?name=Functions.
181+
182+
Replace <APP_NAME> with the name of your function app. Use the URL you just obtained to call the HttpExample function endpoint, appending the query string `?name=Functions`.
182183

183184
The request URL should look something like this:
184185

185186
::: zone pivot="programming-language-java,programming-language-javascript,programming-language-typescript,programming-language-powershell,programming-language-python"
186187
`https://myacafunctionapp.kindtree-796af82b.eastus.azurecontainerapps.io/api/httpexample?name=functions`
187-
::: zone-end
188+
::: zone-end
189+
188190
::: zone pivot="programming-language-csharp"
189191
`https://myacafunctionapp.kindtree-796af82b.eastus.azurecontainerapps.io/api/httpexample`
190192
::: zone-end
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
---
2+
title: Manage your Azure Functions in Container Apps
3+
description: Learn to manage functions in Container Apps
4+
services: container-apps
5+
author: deepganguly
6+
ms.service: azure-container-apps
7+
ms.topic: how-to
8+
ms.date: 01/12/2026
9+
ms.author: deepganguly
10+
---
11+
12+
# Manage Azure Functions in Azure Container Apps
13+
14+
You can manage your deployed functions within Azure Container Apps by using the Azure CLI. The following commands help you list, inspect, and interact with the functions running in your containerized environment.
15+
16+
> [!NOTE]
17+
> When dealing with multirevision scenarios, add the `--revision <REVISION_NAME>` parameter to your command to target a specific revision.
18+
19+
## List functions
20+
21+
View all functions deployed in your container app:
22+
23+
```azurecli
24+
# List all functions
25+
az containerapp function list \
26+
--resource-group $RESOURCE_GROUP \
27+
--name $CONTAINERAPP_NAME
28+
```
29+
30+
## Show function details
31+
32+
Get detailed information about a specific function:
33+
34+
```azurecli
35+
az containerapp function show \
36+
--resource-group $RESOURCE_GROUP \
37+
--name $CONTAINERAPP_NAME \
38+
--function-name <FUNCTIONS_APP_NAME>
39+
```
40+
41+
## Monitor function invocations
42+
43+
Monitoring your function app is essential for understanding its performance and diagnosing problems. The following commands show you how to retrieve function URLs, trigger invocations, and view detailed telemetry and invocation summaries by using the Azure CLI. Before calling the traces, invoke the function a few times by using `curl -X POST "fqdn/api/HttpExample"`.
44+
45+
1. To view invocation traces, get detailed traces of function invocations:
46+
47+
```azurecli
48+
az containerapp function invocations traces \
49+
--name $CONTAINERAPP_NAME \
50+
--resource-group $RESOURCE_GROUP \
51+
--function-name <FUNCTIONS_APP_NAME> \
52+
--timespan 5h \
53+
--limit 3
54+
```
55+
56+
1. View an invocation summary to review successful and failed invocations.
57+
58+
```azurecli
59+
az containerapp function invocations summary \
60+
--name $CONTAINERAPP_NAME \
61+
--resource-group $RESOURCE_GROUP \
62+
--function-name <FUNCTIONS_APP_NAME> \
63+
--timespan 5h
64+
```
65+
66+
## Manage function keys
67+
68+
Azure Functions uses [keys for authentication and authorization](/azure/azure-functions/function-keys-how-to). You can manage the following different types of keys:
69+
70+
- **Host keys**: Access any function in the app
71+
- **Master keys**: Provide administrative access
72+
- **System keys**: Used by Azure services
73+
- **Function keys**: Access specific functions
74+
75+
The following commands show you how to manage keys for the host. To run the same command for a specific Functions app, add the `--function-name <FUNCTIONS_APP_NAME>` parameter to your command.
76+
77+
### List keys
78+
79+
Use the following commands to list host-level and function-specific keys for your Azure Functions running in Container Apps.
80+
81+
> [!NOTE]
82+
> Keep at least one replica running for the following keys management commands to work.
83+
84+
```azurecli
85+
az containerapp function keys list \
86+
--resource-group $RESOURCE_GROUP \
87+
--name $CONTAINERAPP_NAME \
88+
--key-type hostKey
89+
```
90+
91+
### Show a specific key
92+
93+
Show the value of a specific host-level key for your function app by using the following command:
94+
95+
```azurecli
96+
az containerapp function keys show \
97+
--resource-group $RESOURCE_GROUP \
98+
--name $CONTAINERAPP_NAME \
99+
--key-name <KEY_NAME> \
100+
--key-type hostKey
101+
```
102+
103+
### Set a key
104+
105+
Set a specific host-level key for your function app by using the following command:
106+
107+
```azurecli
108+
az containerapp function keys set \
109+
--resource-group $RESOURCE_GROUP \
110+
--name $CONTAINERAPP_NAME \
111+
--key-name <KEY_NAME> \
112+
--key-value <KEY_VALUE> \
113+
--key-type hostKey
114+
```
115+
116+
### Key management with Azure Key Vault
117+
118+
When you use Azure Key Vault to store secrets for Azure Functions on Container Apps, key generation works differently than in traditional Functions hosting.
119+
120+
By default:
121+
122+
- The Functions host doesn't automatically create keys in Key Vault when it starts.
123+
124+
- The Functions host retrieves and uses keys if they already exist in Key Vault.
125+
126+
- The Functions host starts successfully even without keys, and the key synchronization completes normally.
127+
128+
As a result, your application runs correctly, but host-level keys don't appear in Key Vault unless you create them manually.
129+
130+
#### Generate keys manually
131+
132+
To trigger key creation in Azure Key Vault, call the Functions management endpoint by using the following CLI command.
133+
134+
```azurecli
135+
az containerapp function keys list \
136+
-n <CONTAINER_APP_NAME> \
137+
-g <RESOURCE_GROUP> \
138+
--key-type hostKey
139+
```
140+
141+
## Related content
142+
143+
- [Azure Functions on Azure Container Apps overview](../../articles/container-apps/functions-overview.md)

0 commit comments

Comments
 (0)