<p>I have got a Azure AKS cluster running on Azure cloud. It is accessed by frontend and mobile via Azure API Management. My Front end app is outside of the AKS.</p>

<p>Is it possible to use Azure Dev Spaces in this setup to test my changes in the isolated environment?</p>

<p>I've created a new namespace in the AKS and created a separate deployment slot for testing environment on the forntend app, but I can't figure out how to create an isolated routing on Azure API management.</p>

<p>As a result I'd like to have an isolated environment which shares most of the containers on AKS, but uses my local machine to host one service which is under testing at the moment.</p>

Kuba Matjanowski
<p>I assume you intend to use Dev Spaces routing through a <code>space.s.</code> prefix on your domain name. For this to work, you ultimately need a <code>Host</code> header that includes such a prefix as part of the request to the Dev Spaces ingress controller running in your AKS cluster.</p>

<p>It sounds like in your case, you are running your frontend as an Azure Web App and backend services in AKS. Therefore your frontend would need to include the necessary logic to do one of two things:</p>

<ul>
<li>Allow the slot instance to customize the space name to use (e.g. it might call the AKS backend services using something like <code>testing.s.default.myservice.azds.io</code>)</li>
<li>Read the <code>Host</code> header from the frontend request and propagate it to the backend request.</li>
</ul>

<p>In either case, you will probably need to configure Azure API Management to correctly propagate appropriate requests to the testing slot you have created. I don't know enough about how API Management configures routing rules to help on this part, but hopefully I've been able to shed some light on the Dev Spaces part.</p>
