How to separate Development and Production environment on Azure API management?

12/19/2019

I am developing an application using microservice-based architecture. I Know that on Azure API management we can register our APIs. Now the problem I am facing is that my micro-services(development and production ) are deployed on AKS(Azure Kubernetes Service) and both have different IP Addresses as provided by the AKS. How do I differentiate between the two environments so that my front end team has two separate URLs for development and production? The base URI of the API Gateway on azure is pre-configured and cannot be changed, how do I get two URLs?

My main concern is do I need to create two instances of Azure API Management Service?

-- Lucky Rajput
azure
azure-api-management
azure-kubernetes
microservices

2 Answers

12/19/2019

Have you checked Azure API Management DevOps Resource Kit . As recommended, yes you need to create two instances for your environments and deploy using ARM templates

enter image description here

-- Sajeetharan
Source: StackOverflow

1/25/2020

If you don't want to create several instances, you might also try using versions and revisions.

  1. Revisions

You can create revisions by right-clicking an API and tap "Add revision". Revisions

The revision can be accessed via the rev=2 url specifier as shown in the picture above. After successful testing, you can easily set a revision to be the "current" API, which won't need a revision specifier anymore.

  1. Versions

You can create a version by right-clicking an API and tap "Add version". API Management Versions

In the "Versioning scheme" dropdown, you can also choose how the version should be specified. The options are:

  • Path
  • Query string
  • Header

so you can target each version separately.

-- DSpirit
Source: StackOverflow