Hands-on Lab·Kubernetes and Cloud Native Associate
Scale to Zero on Kubernetes
Kubernetes will happily run zero replicas - that half of serverless is built in. What it will not do is start one because a request arrived, and that gap is the entire reason KEDA and Knative exist.
Cloud Native Architecture Guide 32 of 46 Beginner
- Kubernetes1.36.4
- Cluster4 nodes
- Runtimecontainerd 2.2.6
- CNICalico v3.32.1
- TimeAbout 15 min
The objects here are long-stable. Quota and HPA behaviour has not changed materially in years.
- Serverlessnone installed (no KEDA, no Knative)
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| CKA1001 | 192.168.0.175 | Ubuntu 26.04 LTS | Control Plane Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE02 | 192.168.0.177 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when you are asked whether Kubernetes can do serverless. This matters because half of it is already built in - zero replicas is a perfectly valid, healthy state - and the half that is missing is the thing that wakes the workload back up.
- scaling a Deployment to zero and confirming it is running correctly rather than degraded
- finding that nothing in a stock cluster will wake it up - no KEDA, no Knative CRDs
- using a Job as the built-in primitive for work that starts, finishes, and stops
Before you start
- A Deployment you can scale. The autoscaling guide creates one.
-
Zero is a valid replica count
-
Nothing will wake it up
-
The event-driven primitive you do have