title | description | ms.date | monikerRange |
---|---|---|---|
AzureFunctionOnKubernetes@1 - Azure Function on Kubernetes v1 task |
Deploy Azure function to Kubernetes cluster. |
07/02/2024 |
>=azure-pipelines-2022.1 |
:::moniker range=">=azure-pipelines-2022.1"
Deploy Azure function to Kubernetes cluster.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.1"
# Azure Function on Kubernetes v1
# Deploy Azure function to Kubernetes cluster.
- task: AzureFunctionOnKubernetes@1
inputs:
# Service Connections
connectionType: 'Kubernetes Service Connection' # 'Azure Resource Manager' | 'Kubernetes Service Connection'. Required. Service connection type. Default: Kubernetes Service Connection.
dockerRegistryServiceConnection: # string. Required. Docker registry service connection.
#kubernetesServiceConnection: # string. Alias: kubernetesServiceEndpoint. Required when connectionType = Kubernetes Service Connection. Kubernetes service connection.
#azureSubscriptionConnection: # string. Alias: azureSubscriptionEndpoint. Required when connectionType = Azure Resource Manager. Azure subscription.
#azureResourceGroup: # string. Required when connectionType = Azure Resource Manager. Resource group.
#kubernetesCluster: # string. Required when connectionType = Azure Resource Manager. Kubernetes cluster.
# Commands
#namespace: # string. Kubernetes namespace.
#secretName: # string. Secret Name.
#dockerHubNamespace: # string. Docker Hub namespace.
appName: # string. Required. Application Name.
#functionRootDirectory: # string. Function root directory.
#waitForStability: true # boolean. Wait for stability. Default: true.
#arguments: # string. Arguments.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.1"
connectionType
- Service connection type
string
. Required. Allowed values: Azure Resource Manager
, Kubernetes Service Connection
. Default value: Kubernetes Service Connection
.
Select a Kubernetes service connection type.
Kubernetes Service Connection
- Allows you to provide a KubeConfig file, specify a Service Account, or import an AKS instance with the Azure Subscription option. Importing an AKS instance with the Azure Subscription option requires Kubernetes cluster access at Service Connection configuration time.Azure Resource Manager
- Lets you select an AKS instance. Does not access Kubernetes cluster at Service Connection configuration time.
For more information, see Remarks.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.1"
dockerRegistryServiceConnection
- Docker registry service connection
string
. Required.
Select a Docker registry service connection.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.1"
kubernetesServiceConnection
- Kubernetes service connection
Input alias: kubernetesServiceEndpoint
. string
. Required when connectionType = Kubernetes Service Connection
.
Select a Kubernetes service connection.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.1"
azureSubscriptionConnection
- Azure subscription
Input alias: azureSubscriptionEndpoint
. string
. Required when connectionType = Azure Resource Manager
.
Select the Azure Resource Manager subscription, which contains Azure Container Registry.Note: To configure new service connection, select the Azure subscription from the list and click 'Authorize'. If your subscription is not listed or if you want to use an existing Service Principal, you can setup an Azure service connection using 'Add' or 'Manage' button.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.1"
azureResourceGroup
- Resource group
string
. Required when connectionType = Azure Resource Manager
.
Select an Azure resource group.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.1"
kubernetesCluster
- Kubernetes cluster
string
. Required when connectionType = Azure Resource Manager
.
Select an Azure managed cluster.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.1"
namespace
- Kubernetes namespace
string
.
Kubernetes namespace.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.1"
secretName
- Secret Name
string
.
Kubernetes secret containing function config data (for ex. AzureWebJobsStorage: Azure storage connection string
).
:::moniker-end
:::moniker range=">=azure-pipelines-2022.1"
dockerHubNamespace
- Docker Hub namespace
string
.
Docker Hub namespace. Required for private Docker Hub repository.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.1"
appName
- Application Name
string
. Required.
Application Name. The Kubernetes objects created use this name. This should follow Kubernetes naming conventions for resource names.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.1"
functionRootDirectory
- Function root directory
string
.
Function root directory. Should contain host.json. Docker build and push is performed from this directory.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.1"
waitForStability
- Wait for stability
boolean
. Default value: true
.
Wait for the Kubernetes objects to reach the desired state.
:::moniker-end
:::moniker range=">=azure-pipelines-2022.1"
arguments
- Arguments
string
.
Pass arguments to command. Ex:
--no-docker --service-type NodePort.
:::moniker-end
All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.
:::moniker range=">=azure-pipelines-2022.1"
None.
:::moniker-end
::: moniker range="> azure-pipelines-2022"
[!INCLUDE kubernetes-service-connection]
::: moniker-end
:::moniker range=">=azure-pipelines-2022.1"
Requirement | Description |
---|---|
Pipeline types | YAML, Classic build, Classic release |
Runs on | Agent, DeploymentGroup |
Demands | None |
Capabilities | This task does not satisfy any demands for subsequent tasks in the job. |
Command restrictions | Any |
Settable variables | Any |
Agent version | All supported agent versions. |
Task category | Deploy |
:::moniker-end