question

SnehalataThorat-4447 avatar image
0 Votes"
SnehalataThorat-4447 asked shivapatpi-MSFT answered

I had successfully deployed web api on aks but I am not able to route to action. Its calling only get method .

I had successfully deployed web api on aks but I am not able to route to action. Its calling only. Please provide solution for this.

azure-kubernetes-service
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

shivapatpi-MSFT avatar image
0 Votes"
shivapatpi-MSFT answered

Hello @SnehalataThorat-4447 ,
Can you let us know any documents or sequence of steps which you followed ? Did you use ingress to route the traffic ?
In general when we build any .Net WebAPI solution and execute locally we have access to GET operations which are annotated with:
[ApiController]
[Route("[controller]")]

Kindly let us know the detailed sequence of steps which you followed so that we can assist you better.

Have a look at the below documentation and corresponding links of step by step deployment using ingress controller:
https://lemtirisalah.com/deploy-asp-net-5-webapi-to-azure-kubernetes-service-aks-with-https-ingress-controller/

After deploying in AKS try to expose the application via Load Balancer Service and then try to use tool like Postman to perform the Get/POST operations
for example once you got the LB IP
Using Postman:
http://lbip:port/weatherforecast
Click SEND Button
You will get the results

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.