Serverless over Kubernetes
Verdict
Serverless gives you scaling, patching and load balancing as part of the service, so your team spends its time on the product.
When I'd pick the other one
Very large scale with a dedicated platform team and predictable workloads, where a well-run cluster pays for itself. Also long-running stateful services and custom networking.
Kubernetes runs containers across a fleet of machines you’re responsible for. A serverless platform runs your code and handles the machines for you. For most web apps and APIs, I’ll take that trade.
On Cloud Run, Azure Container Apps or AWS Lambda, I hand over the code or a container image and get back an endpoint. Instances start as requests arrive and stop when traffic does, and patching, scaling and load balancing come with the service.
Kubernetes, even managed as GKE, AKS or EKS, needs someone to own the cluster: node pools, upgrades, network policy, resource limits, and the pod that won’t schedule at 2am. With a dedicated platform team and predictable traffic at large scale, that’s worth it. A typical API and database never gets there, and the cluster ends up as the most complicated part of the system.
| Layer | Serverless | Managed Kubernetes |
|---|---|---|
| Your code | You | You |
| Container image | You | You |
| Scaling | Provider | You |
| Load balancing | Provider | You |
| Node patching and upgrades | Provider | Shared |
| Network policy | Provider | You |
| Control plane | Provider | Provider |
If the app ever outgrows serverless, a service packaged as a container moves to Kubernetes as is.
Tyler SandersEngineer, Computer Scientist, Tech Enthusiast