Deploy ASP.NET Core App to Kubernetes Engine




Create Kubernetes Cluster

Create your pod

Allow external traffic

Scale up your service

Roll out an upgrade to your service

Deploy ASP.NET Core App to Kubernetes Engine

50 minutes 9 Credits


Google Cloud Self-Paced Labs


ASP.NET Core is a new open-source and cross-platform framework for building modern cloud-based and internet-connected applications using the C# programming language.

Kubernetes is an open source project which can run in many different environments, from laptops to high-availability multi-node clusters, from public clouds to on-premise deployments, from virtual machines to bare metal.

In this lab, you deploy a simple ASP.NET Core app to Kubernetes running on Container Engine. This lab builds on the Build and launch an ASP.NET Core app from Google Cloud Shell lab. Please consider completing that lab before running this one.

The goal of this lab is for you to turn your code (a simple Hello World ASP.NET Core app here) into a replicated application running on Kubernetes. You take code that you have developed on your machine, turn it into a Docker container image, and then run that image on Container Engine.

Here's a diagram of the various parts in play in this lab to help you understand how pieces fit together. Use this as a reference as you progress through the lab; it should all make sense by the time you get to the end (but feel free to ignore this for now).


For the purpose of this lab, using a managed environment such as Container Engine (a Google-hosted version of Kubernetes running on Compute Engine) allows you to focus more on experiencing Kubernetes rather than setting up the underlying infrastructure.

What you'll learn

  • How to package a simple ASP.NET Core app as a Docker container.
  • How to create your Kubernetes cluster on Container Engine.
  • How to deploy your ASP.NET Core app to a pod.
  • How to allow external traffic to your pod.
  • How to scale up your service and roll out an upgrade.
  • How to run Kubernetes Graphical dashboard.

Join Qwiklabs to read the rest of this lab...and more!

  • Get temporary access to the Google Cloud Console.
  • Over 200 labs from beginner to advanced levels.
  • Bite-sized so you can learn at your own pace.
Join to Start This Lab