Events
Mar 17, 9 p.m. - Mar 21, 10 a.m.
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
APPLIES TO: Developer | Premium
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.
Important
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:
Note
You can also deploy the self-hosted gateway directly to Kubernetes.
Connect your Kubernetes cluster within a supported Azure Arc region.
Install the k8s-extension
Azure CLI extension:
az extension add --name k8s-extension
If you've already installed the k8s-extension
module, update to the latest version:
az extension update --name k8s-extension
Provision a gateway resource in your Azure API Management instance.
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 create
command. Fill in the token
and configuration URL
values.
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
Tip
-protected-
flag for gateway.auth.token
is optional, but recommended.
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:
In the Azure portal, navigate to your Azure Arc-connected cluster.
In the left menu, select Extensions > + Add > API Management gateway (preview).
Select Create.
In the Install API Management gateway window, configure the gateway extension:
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.
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.
Setting | Description |
---|---|
gateway.configuration.uri |
Configuration endpoint in API Management service for the self-hosted gateway. |
gateway.auth.token |
Gateway token (authentication key) to authenticate to API Management service. Typically starts with GatewayKey . |
service.type |
Kubernetes service configuration for the gateway: LoadBalancer , NodePort , or ClusterIP . |
To enable monitoring of the self-hosted gateway, configure the following Log Analytics settings:
Setting | Description |
---|---|
monitoring.customResourceId |
Azure Resource Manager resource ID for the API Management instance. |
monitoring.workspaceId |
Workspace ID of Log Analytics. |
monitoring.ingestionKey |
Secret with ingestion key from Log Analytics. |
Note
If you haven't enabled Log Analytics:
Events
Mar 17, 9 p.m. - Mar 21, 10 a.m.
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Introduction to Azure Arc-enabled Kubernetes - Training
Learn about Azure Arc-enabled Kubernetes and how it can help organizations optimize and simplify their operations.
Certification
Microsoft Certified: Azure Administrator Associate - Certifications
Demonstrate key skills to configure, manage, secure, and administer key professional functions in Microsoft Azure.
Documentation
Support policies for self-hosted gateway
Learn about the support policies and the shared responsibilities for the API Management self-hosted gateway.
Deploy a self-hosted gateway to Kubernetes with YAML
Learn how to deploy a self-hosted gateway component of Azure API Management to Kubernetes with YAML
Provision a self-hosted gateway in Azure API Management
Learn how to provision a self-hosted gateway in Azure API Management.