Anthony Chu Contact Me

Versioning a REST API in Kubernetes with NGINX Ingress Controller

Tuesday, April 11, 2017

An ingress makes it easy to route traffic entering a Kubernetes cluster through a load balancer like NGINX. Beyond basic load balancing and TLS termination, an ingress can have rules for routing to different backends based on paths. The NGINX ingress controller also allows more advanced configurations such as URL rewrites.

In this post, we'll use ingress rules and URL rewrites to route traffic between two versions of a REST API. Each version is deployed as a service (api-version1 and api-version2). We will route traffic with path /api/v1 to api-version1, and /api/v2 to api-version2.

Continue Reading...


Managing ASP.NET Core App Settings on Kubernetes

Tuesday, March 14, 2017

Kubernetes is quickly becoming my favorite container orchestrator. Everything, so far, has been intuitive and it looks like they've put a lot of thought into how all the pieces fit together. One example is how it handles configuration and secrets.

Today we'll look at how to use secrets in Kubernetes to override some properties in an ASP.NET Core app's configuration at runtime.

Continue Reading...


Serving Static Files from Azure Functions

Thursday, March 9, 2017

I've written about how to serve a single HTML page or a single Swagger file with Azure Functions before. But it hasn't really been easy or even possible to serve an entire site with Azure Functions. With the release of a new feature called Azure Functions Proxies a couple of weeks ago, we can now create a pretty capable HTTP static file server using Azure Functions.

Continue Reading...


Hosting Jekyll on Azure App Service on Linux

Tuesday, February 28, 2017

Microsoft announced Azure App Service on Linux back in September. On the surface it looks just like the App Service we know and love, except now running on Linux. But under the covers it's quite different and uses Docker extensively.

Thanks to its support of Docker, we can use almost any Linux-based Docker image in a Linux Web App. Today we'll look at how to set up App Service on Linux to build and serve a Jekyll site that is deployed continuously from GitHub.

Continue Reading...


Using ES2017 async/await in Node

Thursday, February 23, 2017

A couple of days ago, Node 7.6.0 was released. One of the changes was an update to version 5.5 of the V8 JavaScript engine. This meant that async/await support is now enabled by default! Finally, we can use the async and await keywords in Node without the need for a transpiler or turning on command line flags.

And what's better is that Azure App Service has already added support for Node 7.6.0.

Today we'll create a simple application to explore async/await in Node. Then we'll deploy it to Azure App Service.

Continue Reading...