menu
arrow_back

Deploy ASP.NET Core App to Kubernetes Engine

Open Google Console

Caution: When you are in the console, do not deviate from the lab instructions. Doing so may cause your account to be blocked. Learn more.

Deploy ASP.NET Core App to Kubernetes Engine

50 minutes 9 Credits

GSP030

Google Cloud Self-Paced Labs

Overview

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).

app_arch.png

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.

If you are interested in running Kubernetes on your local machine, such as a development laptop, you should probably look into Minikube. This offers a simple setup of a single node kubernetes cluster for development and testing purposes. You can use Minikube to go through this lab if you wish.

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
Score

—/25

Create Kubernetes Cluster

Run Step

/ 5

Create your pod

Run Step

/ 5

Allow external traffic

Run Step

/ 5

Scale up your service

Run Step

/ 5

Roll out an upgrade to your service

Run Step

/ 5

home
Home
school
Catalog
menu
More
More