Deploy an Azure API Management gateway on Azure Arc (preview)
With the integration between Azure API Management and Azure Arc on Kubernetes, you can deploy the API Management gateway component as an extension in an Azure Arc-enabled Kubernetes cluster.
Deploying the API Management gateway on an Azure Arc-enabled Kubernetes cluster expands API Management support for hybrid and multicloud environments. Enable the deployment using a cluster extension to make managing and applying policies to your Azure Arc-enabled cluster a consistent experience.
API Management self-hosted gateway on Azure Arc is currently in preview. During preview, the API Management gateway extension is available in the following regions:
- Asia (East, Southeast)
- Australia (Central, Central 2, East & Southeast)
- Brazil (South & Southeast)
- Canada (Central, East)
- Europe (North, West)
- France (Central & South)
- Germany (North & West Central)
- India (Central, South, West, Jio central & Jio West)
- Japan (East & West)
- Korea (Central & South)
- Norway (East & West)
- South Africa (North & West)
- Sweden (Central)
- Switzerland (North & West)
- United Arab Emirates (UAE - Central & North)
- United Kingdom (UK -South)
- United States (US - Central, Central EUAP, East, East 2, East 2 EUAP, North Central, South Central, West Central, West, West 2, West 3)
You can also deploy the self-hosted gateway directly to Kubernetes.
This feature is available in the Premium and Developer tiers of API Management.
Connect your Kubernetes cluster within a supported Azure Arc region.
k8s-extensionAzure CLI extension:
az extension add --name k8s-extension
If you've already installed the
k8s-extensionmodule, update to the latest version:
az extension update --name k8s-extension
Deploy the API Management gateway extension using Azure CLI
In the Azure portal, navigate to your API Management instance.
Select Gateways from the side navigation menu.
Select and open your provisioned gateway resource from the list.
In your provisioned gateway resource, click Deployment from the side navigation menu.
Make note of the Token and Configuration URL values for the next step.
In Azure CLI, deploy the gateway extension using the
az k8s-extension createcommand. Fill in the
- The following example uses the
service.type='LoadBalancer'extension configuration. See more available extension configurations.
az k8s-extension create --cluster-type connectedClusters --cluster-name <cluster-name> \ --resource-group <rg-name> --name <extension-name> --extension-type Microsoft.ApiManagement.Gateway \ --scope namespace --target-namespace <namespace> \ --configuration-settings gateway.configuration.uri='<Configuration URL>' \ --config-protected-settings gateway.auth.token='<token>' \ --configuration-settings service.type='LoadBalancer' --release-train preview
gateway.auth.tokenis optional, but recommended.
- The following example uses the
Verify deployment status using the following CLI command:
az k8s-extension show --cluster-type connectedClusters --cluster-name <cluster-name> --resource-group <rg-name> --name <extension-name>
Navigate back to the Gateways list to verify the gateway status shows a green check mark with a node count. This status means the deployed self-hosted gateway pods:
- Are successfully communicating with the API Management service.
- Have a regular "heartbeat".
Deploy the API Management gateway extension using Azure portal
In the Azure portal, navigate to your Azure Arc-connected cluster.
In the left menu, select Extensions > + Add > API Management gateway (preview).
In the Install API Management gateway window, configure the gateway extension:
- Select the subscription and resource group for your API Management instance.
- In Gateway details, select the API Management instance and Gateway name. Enter a Namespace scope for your extension and optionally a number of Replicas, if supported in your API Management service tier.
- In Kubernetes configuration, select the default configuration or a different configuration for your cluster. For options, see available extension configurations.
On the Monitoring tab, optionally enable monitoring to upload metrics tracking requests to the gateway and backend. If enabled, select an existing Log Analytics workspace.
Select Review + install and then Install.
Available extension configurations
The self-hosted gateway extension for Azure Arc provides many configuration settings to customize the extension for your environment. This section lists required deployment settings and optional settings for integration with Log Analytics. For a complete list of settings, see the self-hosted gateway extension reference.
The following extension configurations are required.
||Configuration endpoint in API Management service for the self-hosted gateway.|
||Gateway token (authentication key) to authenticate to API Management service. Typically starts with
||Kubernetes service configuration for the gateway:
Log Analytics settings
To enable monitoring of the self-hosted gateway, configure the following Log Analytics settings:
||Azure Resource Manager resource ID for the API Management instance.|
||Workspace ID of Log Analytics.|
||Secret with ingestion key from Log Analytics.|
If you haven't enabled Log Analytics:
- To learn more about the self-hosted gateway, see Azure API Management self-hosted gateway overview.
- Learn more about the observability capabilities of the Azure API Management gateways.
- Discover all Azure Arc-enabled Kubernetes extensions.
- Learn more about Azure Arc-enabled Kubernetes.
- Learn more about guidance to run the self-hosted gateway on Kubernetes in production.
- For configuration options, see the self-hosted gateway extension reference.