This page looks best with JavaScript enabled

Deploy ASP.NET Core WebAPI to Kubernetes on Docker - Live Coding

 ·   ·  ☕ 2 min read

Docker for Windows/Mac has recently introduced built in Kubernetes support. With no prior experience using Kubernetes on Docker let’s see if we can setup and deploy a simple ASP.NET Core project to our new K8S cluster and what kind of issues we run into.

Kubernetes functions as a system administrator as a service and builds on top of Docker to provide management for services. This allows your services to smoothly deploy on top of one another (rolling deployments with no down time), automatically handle hardware failure or service failure and easily adjust to load using load balancers and auto-scaling pods.

The .NET Docker Containers we use are from here: Note that the dotnet images are for dotnet core 1.0 and will not compile dotnet core 2.0. You’ll need to update the image names like we do in the video to make it work.

Learn more about Kubernetes (K8S) here:

Pick up Docker For Windows here (Currently Kubernetes support is only available on Edge version 18.* releases):

Scott Hanselman has created a short blog that also walks through how to setup ASP.NET Core on Kubernetes and uses a very similar solution to the one we create here. If you’re looking to get started quick it’s a great resource:

For more information on Docker’s Kubernetes implementation check out their articles here:

Kubernetes for Docker is also available on Docker for Mac. If you try that out let me know how it goes!

Try adding Helm to your Kubernetes Environment to make managing deployments and their dependencies easier:

Join our Discord channel:

Sam Wronski
Sam Wronski
Maker of things and professional software engineer. Lets make something awesome together!