Question

Difficulty: MediumProvision and Configure Azure API Management

You are deploying a set of containerized microservices to an on-premises Docker environment. You want to use an existing Azure API Management (APIM) instance in the cloud to manage and secure these on-premises microservices. You decide to provision a self-hosted gateway.

Which of the following actions must you perform to configure and run the self-hosted gateway? (Select TWO)

  1. Create a Gateway resource in the Azure API Management instance and retrieve the configuration endpoint URL and an access token.Answer
  2. Deploy the official self-hosted gateway Docker container, passing the configuration endpoint URL and access token as environment variables.Answer
  3. C
    Enable a system-assigned managed identity on the local Docker host and grant it the Reader role on the Azure API Management resource.
  4. D
    Configure a Key Vault Access Policy that allows the Docker host service principal to retrieve the gateway's communication certificate from Azure Key Vault.

Answer

To provision and run the self-hosted gateway, you must create a Gateway resource in the API Management instance to retrieve the configuration endpoint and access token, and then deploy the official gateway container using these values as environment variables.
To deploy a self-hosted gateway, you must first register it as a Gateway resource in your Azure API Management instance. This registration provides the configuration endpoint URL and an access token. You then run the gateway container (e.g., in Docker) and pass these values as environment variables (config.service.endpoint and config.service.auth) so the gateway can pull its configuration.

Step-by-Step Solution

1
Register the Gateway in Azure API Management
A configuration endpoint and an access token are generated.
The gateway container needs these credentials to authenticate and fetch its configuration from Azure.
2
Run the Gateway Container on-premises
The gateway container starts up and connects to the APIM control plane.
Providing the configuration endpoint and token as environment variables allows the containerized gateway to sync its API routing rules.

Key Concept

Provisioning and deploying an Azure API Management self-hosted gateway

Alternative Method

Alternatively, you can deploy the self-hosted gateway to a Kubernetes cluster using a Helm chart or YAML manifest, but you must still provision the Gateway resource in Azure and provide the endpoint and token as configuration secrets.
Estimated Time:1m 30s
Rate this question