Events
Mar 17, 9 PM - Mar 21, 10 AM
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
This article describes the steps for deploying the self-hosted gateway component of Azure API Management to a Kubernetes cluster.
Note
You can also deploy self-hosted gateway to an Azure Arc-enabled Kubernetes cluster as a cluster extension.
Tip
Single-node clusters work well for development and evaluation purposes. Use Kubernetes Certified multi-node clusters on-premises or in the cloud for production workloads.
Tip
The following steps deploy the self-hosted gateway to Kubernetes and enable authentication to the API Management instance by using a gateway access token (authentication key). You can also deploy the self-hosted gateway to Kubernetes and enable authentication to the API Management instance by using Microsoft Entra ID.
kubectl
commands to the clipboard.az aks get-credentials --resource-group <resource-group-name> --name <resource-name> --admin
in a new terminal session.Run the following command to check if the deployment succeeded. It might take a little time for all the objects to be created and for the pods to initialize.
kubectl get deployments
It should return
NAME READY UP-TO-DATE AVAILABLE AGE
<gateway-name> 1/1 1 1 18s
Run the following command to check if the services were successfully created. Your service IPs and ports will be different.
kubectl get services
It should return
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
<gateway-name>-live-traffic ClusterIP None <none> 4290/UDP,4291/UDP 9m1s
<gateway-name>-instance-discovery LoadBalancer 10.99.236.168 <pending> 80:31620/TCP,443:30456/TCP 9m1s
Go back to the Azure portal and select Overview.
Confirm that Status shows a green check mark, followed by a node count that matches the number of replicas specified in the YAML file. This status means the deployed self-hosted gateway pods are successfully communicating with the API Management service and have a regular "heartbeat."
Tip
kubectl logs deployment/<gateway-name>
command to view logs from a randomly selected pod if there's more than one.kubectl logs -h
for a complete set of command options, such as how to view logs for a specific pod or container.Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Deploy a containerized application on Azure Kubernetes Service - Training
Explore how to create and deploy a containerized application by using Azure Kubernetes Service declarative manifest files.
Certification
Microsoft Certified: Azure for SAP Workloads Specialty - Certifications
Demonstrate planning, migration, and operation of an SAP solution on Microsoft Azure while you leverage Azure resources.
Documentation
Self-hosted gateway on Kubernetes in production
Learn about guidance to run an API Management self-hosted gateway on Kubernetes for production workloads
Deploy a self-hosted gateway to Kubernetes with Helm
Learn how to deploy self-hosted gateway component of Azure API Management to Kubernetes with Helm
Provision a self-hosted gateway in Azure API Management
Learn how to provision a self-hosted gateway in Azure API Management.