.NET6 app hosting architecture for Kubernetes
summary
Practical guide to hosting .NET6 on Kubernetes: explains the new WebApplicationBuilder and why Run lacks an external cancellation token, details the three probes (startup probe, liveness probe, readiness probe), shows a working pattern using a pre-stop hook with a 5s sleep, an active request middleware with an interlocked counter and a hosted graceful-shutdown task that polls (four times per second) until zero active requests, and points to live code in the GitHub repo k8s hosting.
AI-written summary · about
chapters (12)
- 0:00Welcome
- 0:49Introduction to .NET6 hosting
- 2:35.NET6 hosting API changes
- 5:33Kubernetes probes for health
- 8:43Slow startup in ASP.NET Core
- 10:50Graceful shutdown in pods
- 15:21Pre-stop hooks and draining
- 16:48Active request tracking
- 19:38Standardized Kubernetes pipeline
- 22:10Live demo of .NET6 service
- 26:25Q&A on hosting
- 32:02Closing remarks
related talks
50mKubernetes for .NET developers
01h 04mNavigating microservices with .NET Core
53mResilient microservices with Kubernetes
01h 01mKubernetes, Azure and .NET - What's it all about?
01h 01mGetting started with Kubernetes for your .NET Application
19mKube Me This! Kubernetes Ideas and Best Practices
58mKubernetes for .NET Developers
55mHow to develop apps on K8s and not die trying
