Azure Kubernetes Service: Host ASP.NET Core 3.0 app in Docker Windows Server containers

Kubernetes has production level support for Windows nodes and Windows containers starting v1.14. The preview of Windows Server containers in Azure Kubernetes Service was announced recently and in this article I am going to share steps needed to run Windows containers in AKS.

  • Create a ASP.NET Core 3.0 (preview) application
  • Build and Publish Docker Image (Windows Server 2019)
  • Deploy ASP.NET Core 3.0 application to Windows nodes in Azure Kubernetes Service cluster

The dev tools used to develop these components are Visual Studio 2019/VS Code/Visual Studio for Mac, Docker for Windows (Docker CE) & Kubectl. AKS Dashboard as well as kubectl commands are used to create Kubernetes resources in AKS. The source code is available for download at GitHub.

Continue reading “Azure Kubernetes Service: Host ASP.NET Core 3.0 app in Docker Windows Server containers”

Configure Kubernetes Liveness and Readiness probes for ASP.NET Core 2.2 web application using Health checks

Health checks API is one of the new features of ASP.NET Core 2.2 for application health monitoring. Health checks are exposed by ASP.NET Core 2.2 application as HTTP endpoints which enables liveness and readiness probes.

Health checks are usually used with an external monitoring service or container orchestrator to check the status of an app. In this article, I am going to share steps needed to configure Kubernetes Liveness and Readiness probes for an ASP.NET Core 2.2 web application deployed in Azure Kubernetes Service cluster.

The dev tools used to develop these components are Visual Studio for Mac/Visual Studio 2017 and Visual Studio Code. AKS Dashboard as well as kubectl commands are used to create Kubernetes resources in AKS. The complete source code for this application can be downloaded from GitHub

Continue reading “Configure Kubernetes Liveness and Readiness probes for ASP.NET Core 2.2 web application using Health checks”

Host your ASP.NET Core 2.2 Web App with IIS (in-process and out-of-process hosting model) and deploy to Docker Windows Containers

One of the new features of ASP.NET Core 2.2 is support for hosting ASP.NET Core Web App with IIS using in-process or out-of-process hosting model. This article will cover steps needed to

  • Host ASP.NET Core 2.2 Web API with IIS using in-process hosting model
  • Host ASP.NET Core 2.2 Web API with IIS using out-of-process hosting model
  • Host ASP.NET Core 2.2 Web API in Docker Windows containers (with IIS)

In ASP.NET Core 2.2, a new ASP.NET Core Module (AspNetCoreModuleV2) has been introduced which is a native IIS module that plugs into the IIS pipeline and provides in-process or out-of-process hosting capabilities. AspNetCoreModule used to be the module in previous version.

Continue reading “Host your ASP.NET Core 2.2 Web App with IIS (in-process and out-of-process hosting model) and deploy to Docker Windows Containers”

ASP.NET Core 2.1 Web API – Load App Configuration from appsettings.json, Dockerfile environment variables, Azure Key Vault Secrets and Kubernetes ConfigMaps/Secrets

This article is second part of the series on Deploying Angular, ASP.NET Core and SQL Server on Linux to Azure Kubernetes Service (AKS) cluster. The first part, describes steps needed to deploy these components to AKS. App configuration in ASP.NET Core is based on key-value pairs established by configuration providers. Configuration providers read configuration data into key-value pairs from a variety of configuration sources. In this article I am going to share multiple ways to load App configuration in ASP.net Core Web API

  • Hosting Environment specific appsettings.json
  • Dockerfile Environment Variables
  • Kubernetes
    • Container Environment variables with data from ConfigMap/Secret
    • Populate Volume (Config file) with data stored in a ConfigMap/Secret
  • Azure Key Vault Secrets

The tools used to develop these components are Visual Studio for Mac/VS Code/VS 2017, AKS Dashboard, Docker for Desktop and kubectl. The formatting of code snippets in this article may get distorted (especially yaml), thus please refer to GitHub repository for complete source code for this article.

Continue reading “ASP.NET Core 2.1 Web API – Load App Configuration from appsettings.json, Dockerfile environment variables, Azure Key Vault Secrets and Kubernetes ConfigMaps/Secrets”