Saturday 30 July 2022

Log All Requests in ASP.NET Core API

Logging all incoming requests and the respose returned data in an API are useful way to diagnose any issues and monitor requests to an API. You can easily enable request logging in AP.NET Core 6 APIs, by setting the log level in app settings. Enabling such request reponse data logging will be useful in containerized APIs deployed to Kubernetes or even for APIs deployed to AzureApp Services  to diagnose and monitoring purposes. Let's look at how to enable request logging.

Saturday 23 July 2022

Path Based Routing to AKS Ingress with Application Gateway Ingress Controller

 We have discussed getting Application Gateway Ingress Controller (AGIC) deployed using AGIC addon method in the post "Enable Application Gateway Ingress Controller (AGIC) for AKS - SImplest Way with a New App Gatway in Same vNet of AKS Cluster". We have tried a sample app deployment and added a routing ingress rule, to route to root, and reach the sample application toverify the working state of the AGIC in AKS cluster. However, generally in the APIs we deploy to AKS cluster, would require path based routing to reach, diffrent APIs. Let's discuss how to create ingress path based routing to AKS deployed APIs using AGIC.

Saturday 16 July 2022

Enable Application Gateway Ingress Controller (AGIC) for AKS - SImplest Way with a New App Gatway in Same vNet of AKS Cluster

 With AKS you can use Nginx ingress controller as can be done with any Kubernetes cluster. However, you might want to have more integratied experience with Azure cloud services, so that other Azure serivces can easily access your applications in your AKS. Application Gateway Ingress Controller (AGIC) is a great way to implement secure ingress for AKS. Essntially, AGIC is a pod deployed in AKS, which will monitor AKS ingress resources and apply App Gatway configurations based on AKS ingress. Let's see how to enable AKS ingress using Application Gateway Ingress Controller, by creating a new App Gatway in the same virtual network of the AKS cluster.

Saturday 9 July 2022

Listing and Switching Kubernetes Config Contexts

You may be having to work with multiple Kubernetes clusters while development or administering. Once you add credentials to kubeconfig you can work with a single cluster at a time, sing kubectl commands. In this post let's see how we can list and switch between different Kubernetes clsuters added to kubeconfig.

Saturday 2 July 2022

Enable Swagger UI with an .NET 6 API having Custom Routing

 In .NET APIs using swagger for API documentation is really useful to perform API testing and to describe API. We may need to set custom API routing, specially when w deploy the APIs as contianers to Kubernetes, to enable path based routing using ingress such as Nginx. Let's look at steps of setting up custom routing and getting swagger to work with custom routing using a .NET 6 API.

Popular Posts