Troubleshooting·Kubernetes and Cloud Native Associate
Replica Count and Cluster Capacity
Scale to 8 with a ResourceQuota and an HPA in place and you land on 4. One limiter rejected Pod creation with an explicit quota error; the other quietly rewrote your replica count. Telling them apart is the skill.
Cloud Native Architecture Guide 33 of 46 Intermediate
- Kubernetes1.36.4
- Cluster4 nodes
- Runtimecontainerd 2.2.6
- CNICalico v3.32.1
- TimeAbout 16 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 a scale command reports success and the replica count settles somewhere else entirely. This matters because two separate things can overrule the number you typed, neither returns an error at the command line, and each leaves its evidence somewhere different.
- putting a ResourceQuota on a namespace and then scaling a Deployment past it
- seeing
scale --replicas=8succeed at the command line and land on four - finding the quota's refusal on the ReplicaSet and in
FailedCreateevents rather than on the Deployment - discovering the HPA's
maxReplicasquietly owning the replica count as the second limiter
Before you start
- A namespace you can put a quota on, and a Deployment with resource requests.
- The autoscaling guide, since an HPA is one of the two limiters here.
-
Put a quota on the namespace
-
Ask for eight
-
Limiter one: the quota refused, and said so
-
Limiter two: the HPA rewrote your number