Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 3.47 KB

File metadata and controls

52 lines (38 loc) · 3.47 KB
title Deploy a Self-Hosted Gateway to Kubernetes with YAML
description Learn how to deploy a self-hosted gateway component of Azure API Management to Kubernetes with YAML.
author dlepow
manager gwallace
ms.service azure-api-management
ms.topic how-to
ms.author danlep
ms.date 10/08/2025

Deploy a self-hosted gateway to Kubernetes with YAML

[!INCLUDE api-management-availability-premium-dev]

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.

Prerequisites

Deploy to Kubernetes

[!INCLUDE api-management-self-hosted-gateway-authentication]

  1. Select Gateways under Deployment and infrastructure.
  2. Select the self-hosted gateway resource that you want to deploy.
  3. Select Deployment.
  4. An access token in the Token text box was autogenerated for you, based on the default Expiry and Secret key values. If needed, choose values in either or both controls to generate a new token.
  5. Select the Kubernetes tab under Deployment scripts.
  6. Select the <gateway-name>.yml file link and download the YAML file.
  7. Select the copy icon at the lower-right corner of the Deploy text box to save the kubectl commands to the clipboard.
  8. When using Azure Kubernetes Service (AKS), run az aks get-credentials --resource-group <resource-group-name> --name <resource-name> --admin in a new terminal session.
  9. Run the commands to create the necessary Kubernetes objects in the default namespace and start self-hosted gateway pods from the container image downloaded from the Microsoft Artifact Registry.
    • The first step creates a Kubernetes secret that contains the access token generated in step 4. Next, it creates a Kubernetes deployment for the self-hosted gateway, which uses a ConfigMap with the configuration of the gateway.

[!INCLUDE api-management-self-hosted-gateway-kubernetes-services]

Related content