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 分钟 9 个积分


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.

加入 Qwiklabs 即可阅读本实验的剩余内容…以及更多精彩内容!

  • 获取对“Google Cloud Console”的临时访问权限。
  • 200 多项实验,从入门级实验到高级实验,应有尽有。
  • 内容短小精悍,便于您按照自己的节奏进行学习。