Manual Scaling in Kubernetes: Turning the Dial Yourself

Manual Scaling in Kubernetes: Turning the Dial Yourself

A beginner-friendly guide to changing how many copies of your application run in a cluster, by hand and on purpose, including what really happens behind the scenes and how to do it safely.

Imagine you run a small tea stall near a railway station. On an ordinary morning, two people behind the counter are enough. But you know that on the day of a big cricket match, thousands of fans will pour through the station, so you call three more helpers for that day only. Once the crowd is gone, you send them home so you are not paying for idle hands. Nobody had to invent a clever machine to decide this. You looked at the calendar, made a decision, and changed the number of people yourself.

Manual scaling in Kubernetes is exactly this decision. Your application runs as a number of identical copies, and you, the operator, choose how many copies should exist. You turn the dial up before a busy day, turn it down when things are quiet, and turn it to zero when nobody needs the service at all. It sounds almost too simple to need a whole guide, but the details matter: what really happens when the number changes, which copies are removed first, what can stop new copies from starting, and how manual changes coexist with automatic tools. By the end of this guide you will understand all of it in plain words.

1The Problem: Demand Never Stays Still

Before learning the tool, it helps to feel the problem that the tool removes.

Applications have busy days and quiet days

Almost every application faces uneven demand. A shopping website is flooded during a festival sale and nearly empty at three in the morning. A tax-filing portal is quiet for most of the year and overloaded in the last week before the deadline. A school results website may sit idle for eleven months and then receive a million visitors in one hour. If you always run enough copies for the busiest moment, you waste money for most of the year. If you always run enough copies for the quiet moments, the service collapses when the crowd arrives.

What a copy really is

In Kubernetes, your program runs inside a small unit called a Pod. To handle more visitors, you do not make one Pod bigger; you run more identical Pods side by side, and a Service shares the visitors between them. Each Pod is called a replica, and the number of replicas is a single setting. Changing that setting is what scaling means in this context.

Simple Analogy

Think of the checkout counters in a supermarket. When the queue gets long, the manager opens more counters. Each counter is identical and handles customers in the same way. Opening or closing counters does not change how a single counter works, it only changes how many customers can be served at the same time.

Why deciding by hand is sometimes best

Many people assume that automatic scaling is always better than manual scaling. It is not. Automatic tools react to what has already happened: they notice load after it arrives. A human, on the other hand, knows things the computer cannot know, such as “our advertisement goes live on television at eight tonight” or “the database will be under maintenance on Sunday”. Manual scaling gives you predictability, control and simplicity, and it is the foundation that every automatic scaler is built upon.

!
Common Misconception

Manual scaling is not “old fashioned” or “for beginners only”. Even the most advanced automatic scaling tools work by changing the very same replica number that you can change yourself.

1 number
the replica count is the only dial
Seconds
a change is accepted almost instantly
0 to many
you may scale anywhere from none upward

2What Is Manual Scaling?

Manual scaling means a person deliberately changes how many replicas of a workload should run.

The plain definition

Manual scaling is the act of a human, or a script that a human controls, setting the desired number of replicas for a workload such as a Deployment. You state a new number, Kubernetes accepts it, and its controllers work to make reality match that number by creating or removing Pods. Nothing measures your traffic or your processor use. The number stays exactly where you put it until someone changes it again.

Desired state versus actual state

Kubernetes works on a simple principle. You describe the state you want, called the desired state, and the cluster constantly compares it with the state that actually exists, called the actual state. Whenever the two differ, controllers take action to close the gap. When you scale manually, you only change the desired state. The controllers do the real work.

Simple Analogy

It is like setting the temperature on an air conditioner. You do not personally cool the room. You choose a target, and the machine keeps working until the room reaches it. Manual scaling is choosing the target number of Pods.

Where it is used

Teams use manual scaling before planned events, during emergencies, in test and development environments, for applications with steady and predictable demand, and whenever they want a precise, fixed capacity. It is also used in cost-saving routines, such as shutting down non-production workloads at night and bringing them back in the morning.

i
Remember This

Manual scaling changes the number of copies, not the size of each copy. Making each Pod bigger, with more memory or processor power, is a different idea called vertical scaling, which is explained in the next chapter.

3Horizontal, Vertical, Manual and Automatic: Untangling the Words

Scaling has two directions and two styles. Mixing them up is the most common source of confusion for newcomers.

Two directions

Direction 1

Horizontal scaling

Changing the number of copies. More Pods share the work. This is what manual scaling in Kubernetes usually means.

Direction 2

Vertical scaling

Changing the size of each copy, by giving a Pod more memory or processor power. The number of copies stays the same.

Two styles

Style 1

Manual scaling

A person chooses the number. It changes only when a person changes it again.

Style 2

Automatic scaling

A tool watches measurements, such as processor use, and changes the number by itself according to rules.

Simple Analogy

Suppose a delivery company needs to move more parcels. Horizontal scaling is hiring more drivers with the same vans. Vertical scaling is buying bigger vans for the same drivers. Manual scaling means the manager decides how many drivers to hire. Automatic scaling means a computer watches the parcel pile and calls in drivers on its own.

Tool or ideaWhat it changesWho decidesTypical strength
Manual scalingNumber of PodsA personPredictable, simple, fully controlled
Horizontal Pod AutoscalerNumber of PodsA rule based on measurementsReacts to load without human effort
Vertical Pod AutoscalerSize of each PodA recommendation engineRight-sizes memory and processor requests
Cluster AutoscalerNumber of machinesPending Pods that do not fitAdds and removes nodes as needed
Event-driven autoscaling add-onsNumber of Pods, including down to zeroExternal events such as queue lengthSuits background workers and bursty jobs
i
Good to Know

These tools are not rivals. Many teams combine them: manual control for planned events and special cases, an automatic scaler for everyday variation, and a node scaler to make sure there is always room for new Pods.

4Where Scaling Fits in the Kubernetes Architecture

To understand what happens when you change a number, you need a quick picture of the cluster around it.

The main players

A Kubernetes cluster has a control plane, which is the brain, and worker machines called nodes, which are the muscles. Several parts cooperate whenever you scale a workload. The cards below introduce each one in simple words.

Component 1

API Server

The front door of the cluster. Your scaling request arrives here, is checked for permission and validity, and is then accepted.

Component 2

etcd

The cluster’s memory. The new desired replica number is saved here.

Component 3

Deployment controller

Watches Deployments and manages the ReplicaSets underneath them. It passes the new number down to the right ReplicaSet.

Component 4

ReplicaSet controller

The worker that actually counts Pods and creates or deletes them until the count matches the desired number.

Component 5

Scheduler

Chooses which node should run each newly created Pod, based on free room and placement rules.

Component 6

Kubelet

The caretaker on each node. It starts the containers of new Pods and stops the containers of removed ones.

flowchart LR
  U["Operator changes replica number"] --> A["API Server"]
  A -->|"save desired state"| E[("etcd database")]
  A --> D["Deployment controller"]
  D --> R["ReplicaSet controller"]
  R -->|"create or delete Pods"| A
  A --> S["Scheduler"]
  S -->|"pick a node"| K["Kubelet on node"]
  K --> P["Pods running"]
        
FIG 1 — The path from a changed number to running Pods

Read the picture from left to right. The operator changes the number, the API Server saves it, and controllers notice the change. The ReplicaSet controller compares the desired count with the actual count and asks for Pods to be created or deleted. The scheduler picks a machine for each new Pod, and the kubelet on that machine starts it. No single part does everything, and each part only reacts to what it sees.

Simple Analogy

Consider a restaurant. The owner announces, “we need eight waiters tonight”. The manager, that is the controller, checks how many are present and phones the agency for more. The agency, like the scheduler, decides which waiter goes to which restaurant. Each waiter, like a kubelet, then reports for duty. The owner never phoned anyone personally.

5What Can Be Scaled by Hand?

Not every Kubernetes object has a replica number. Knowing which ones do saves confusion.

Kubernetes has several kinds of workload objects, each designed for a different purpose. Some of them have a replica number that you can change, and some do not, because their design forbids it.

WorkloadCan you scale it?How scaling behaves
DeploymentYesThe most common target. Scaling adds or removes Pods without restarting the others.
ReplicaSetYesWorks directly, but is normally managed by a Deployment, so change the Deployment instead.
StatefulSetYesPods have fixed identities and are added or removed in a careful order by default.
ReplicationControllerYesAn older ancestor of ReplicaSet, rarely used in new work.
DaemonSetNo replica numberIt runs exactly one Pod per matching node. You change the count by changing the nodes.
JobNot in the same wayYou adjust how many Pods run in parallel and how many completions are needed.
Custom resourcesSometimesIf the extension supports the standard scale interface, it can be scaled like the built-in ones.

Why a Deployment is the usual choice

A Deployment sits on top of ReplicaSets and gives you rolling updates, rollback and easy scaling in one object. It is designed for stateless programs, meaning programs where any copy can answer any request equally well. Because the copies are interchangeable, adding or removing them is safe and simple.

Simple Analogy

A Deployment is like a call centre where every agent knows the same script. Adding another agent, or letting one go home, does not disturb the others, because any agent can take any call. A DaemonSet is more like a security guard at every building entrance: you cannot add “another guard” without adding another building.

!
Common Mistake

Trying to scale a DaemonSet by hand. It has no replica number, because its Pod count always equals the number of matching nodes. To run more copies, add more nodes or widen the rule that selects them.

6Internal Working: What Happens When You Change the Number

Now that you know the players, let us follow one scaling request from your keyboard to running Pods.

The journey step by step

1

You submit a new replica number

Through a command, a file, a dashboard or an API call, you send the new number to the API Server.

2

The API Server checks and saves it

It confirms who you are, checks that you are allowed to change the scale, validates the request and stores the new desired number in etcd.

3

The Deployment controller notices

It sees that the desired count changed and updates the ReplicaSet that belongs to the current version of your application.

4

The ReplicaSet controller compares counts

It counts the Pods that match its label rule. If there are too few, it creates the missing ones. If there are too many, it deletes the extra ones.

5

The scheduler places new Pods

Each new Pod starts without a machine. The scheduler finds a node with enough free room and assigns the Pod to it.

6

The kubelet starts the containers

The node downloads the container image if it is not already present, starts the containers and runs the health checks.

7

The Service begins sending traffic

Once a Pod reports that it is ready, it is added to the list of addresses behind the Service and starts receiving visitors.

sequenceDiagram
  participant Op as Operator
  participant API as API Server
  participant DC as Deployment controller
  participant RC as ReplicaSet controller
  participant Sch as Scheduler
  participant Kub as Kubelet
  participant Svc as Service
  Op->>API: Set replicas from 3 to 6
  API->>DC: Desired state changed
  DC->>RC: Update ReplicaSet target
  RC->>API: Create 3 new Pods
  API->>Sch: Pods need a node
  Sch->>API: Assign nodes
  API->>Kub: Start assigned Pods
  Kub->>API: Pods report ready
  API->>Svc: Add ready Pods as targets
        
FIG 2 — Life of a scale-up request from three copies to six

An important fact: scaling is not a rollout

When you change only the replica number of a Deployment, the Pod template stays the same. Kubernetes therefore does not create a new version, does not replace existing Pods and does not restart anything. It simply adds or removes copies. This is why scaling is fast and low-risk compared with updating the application itself.

i
Timing Note

Accepting your request takes moments, but having new Pods ready to serve can take much longer. Downloading a large image, starting a slow program and passing health checks all add time. Plan ahead instead of scaling at the last second.

“Changing the number is instant. Having the extra copies ready to help is not.”

7Different Ways to Scale Manually

There is more than one road to the same destination. Each road suits a different way of working.

Method 1

The scale command

The command-line tool has a dedicated scale action. You name the workload and the new number, and the change is sent straight away. It is the quickest option for emergencies and experiments.

Method 2

Editing the live object

You open the running object in an editor, change the replica number and save. It works, but it leaves no record outside the cluster.

Method 3

Changing the definition file

You change the replica number in the written definition of the workload and apply the file. The definition stays the single source of truth.

Method 4

A reviewed change in version control

Teams that use a GitOps tool change the number in a repository and let the tool apply it. Every change is reviewed, dated and reversible.

Method 5

The scale interface of the API

Programs and scripts can call a small dedicated interface, called the scale subresource, that reads or writes only the replica number. It is the safest way to automate scaling.

Method 6

Dashboards and platform portals

Graphical tools offer a simple control to raise or lower the number, useful for people who prefer not to use a terminal.

Imperative versus declarative

The first, second, fifth and sixth methods are imperative, meaning you give a direct command to the live cluster. The third and fourth are declarative, meaning you describe the wanted end state in a file and let tools apply it. Both are valid, but they behave very differently over time.

Simple Analogy

Imperative is telling a taxi driver every turn. Declarative is giving the driver an address and letting the satnav decide. For a one-off emergency trip, shouting directions is fine. For a route your team takes every week, writing the destination down is better.

Safety checks you can add

The scale command can include useful conditions. You can ask it to act only if the current number is what you expect, so that two people scaling at the same moment do not overwrite each other. You can also give it a time limit to wait for the change to finish. These small options turn a blunt instrument into a careful one.

!
Important Warning

A number changed directly on the live cluster is not written into your definition files. The next time someone applies the old file, or a GitOps tool corrects the cluster, your change is silently reversed. Always update the source of truth as well.

8Scaling Up: What Must Be True for New Pods to Work

Asking for more copies does not guarantee getting them. Several things can stand in the way.

When you raise the number, Kubernetes creates new Pod objects immediately, but a Pod object is only a promise. To become a working copy, it needs room on a machine, permission to use resources, an available image and a passing health check. If any of these fail, the Pod waits in a state called Pending or fails to become ready.

Enough room on the nodes

Every Pod declares how much processor power and memory it needs, called its requests. The scheduler only places a Pod on a node with enough unreserved room. If every node is full, the new Pod stays Pending until room appears.

Enough quota for the team

Administrators can set a resource quota on a namespace, which is a cap on total Pods, processor power or memory that team may use. If your scale-up would exceed the cap, the extra Pods are refused.

Placement rules that can be satisfied

Rules such as “never put two copies on the same machine” or “spread evenly across zones” can make it impossible to place additional Pods once the available machines or zones are used up.

The container image is reachable

Each new node needs to download the image. Slow registries, very large images or missing pull credentials delay or block new copies.

A health check that passes

A Pod receives traffic only when its readiness check succeeds. A slow-starting application makes the new copy useless for a while, even though it is running.

Dependencies that can handle more copies

More copies of your program means more connections to your database and other services. If those systems have limits, scaling up may simply move the bottleneck elsewhere.

flowchart TD
  N["New Pod created"] --> Q{"Namespace quota allows it?"}
  Q -->|"No"| X1["Pod refused"]
  Q -->|"Yes"| F{"Node with enough free room?"}
  F -->|"No"| X2["Pod stays Pending"]
  F -->|"Yes"| I{"Image downloads and starts?"}
  I -->|"No"| X3["Image pull problem"]
  I -->|"Yes"| H{"Readiness check passes?"}
  H -->|"No"| X4["Running but receives no traffic"]
  H -->|"Yes"| OK["Pod serves visitors"]
        
FIG 3 — The gates a new Pod must pass before it helps
Simple Analogy

Hiring five extra waiters for the evening is useless if the restaurant has only ten aprons, the agency says you have used your budget, or the new waiters need an hour of training before they can serve. Scaling up succeeds only when every one of these gates is open.

i
Practical Tip

If scaling up leaves Pods Pending, the cause is almost always written in the Pod’s events. Reading the events first saves guessing. Typical messages mention insufficient processor power, insufficient memory or unsatisfied placement rules.

9Scaling Down: Which Pods Go and How

Removing copies looks easy, but it is where careless scaling hurts real users.

Which Pods are removed first?

When the desired number drops, the ReplicaSet controller must choose which Pods to delete. It does not choose randomly. It follows a set of preferences, roughly in this order. Pods that are not yet placed on any node go first. Pods that are not ready go before ready ones. Pods whose owners have given them a lower deletion priority go earlier. Pods on nodes that already hold many copies go before Pods on lightly loaded nodes, which helps keep the spread even. Newer Pods tend to go before older ones, and Pods that have restarted many times may go earlier.

You can influence this choice. Kubernetes lets you attach a special note to a Pod, called a deletion cost, so that Pods you consider cheaper to lose are removed first. This is a hint, not a strict guarantee, but it is helpful when some Pods hold warm caches or long-running work.

Graceful termination

A Pod selected for removal is not killed at once. Kubernetes first marks it as terminating and removes it from the Service so that no new visitors arrive. It then sends a polite stop signal to the program and waits for a grace period, thirty seconds by default, so the program can finish current requests and close connections. Only if the program is still running after that time is it stopped forcibly.

1

The Pod is chosen and marked terminating

The controller decides which copy to remove and the Pod’s state changes.

2

The Service stops sending it new traffic

The Pod is taken off the list of ready addresses, though a short delay in spreading this news is possible.

3

An optional pre-stop step runs

If defined, a short task runs first, often a small pause to let the network catch up.

4

The program receives a stop signal

A well-written application finishes current work and exits cleanly.

5

After the grace period, a forced stop

Anything still running is stopped, and the Pod is finally deleted.

Simple Analogy

It is like a shop closing for the night. The staff first stop letting new customers in, then finish serving those already inside, then tidy up and lock the door. A shop that simply switched off the lights while customers were mid-purchase would lose goodwill.

A surprising limit: disruption budgets do not apply

Kubernetes offers an object called a Pod Disruption Budget, which says “never let fewer than this many Pods be available during voluntary disruptions”. It protects Pods during maintenance actions such as draining a node. However, scaling down through a Deployment is not treated as that kind of disruption. The controller simply deletes Pods, and the budget does not stop it. You must therefore choose scale-down numbers carefully yourself.

!
Common Mistake

Scaling down from twenty copies to two in one step during business hours. The remaining Pods suddenly carry ten times the load, and the service may slow down or fail. Reduce in stages and watch the effect.

10Scaling to Zero and Back

Setting the number to zero is a legitimate and useful move, but it has consequences worth knowing.

What zero means

Scaling a Deployment to zero removes every Pod but keeps the Deployment object, its settings and its history. The application is effectively switched off, yet it is remembered exactly as it was. Raising the number again brings the Pods back. It is the cleanest way to pause a workload without deleting anything.

Why teams do it

Reason 1

Saving money

Development and testing workloads are scaled to zero overnight and at weekends, so no compute is used while nobody is working.

Reason 2

Maintenance

Before a database upgrade, dependent applications are scaled to zero so they do not write during the change.

Reason 3

Incident containment

A misbehaving application that is corrupting data can be stopped instantly while the cause is found.

Reason 4

Retiring gently

Before deleting an old service, teams scale it to zero and wait to see whether anyone complains.

What to expect while at zero

With no Pods, the Service behind the application has no addresses to send visitors to, so requests fail. Scheduled work and background processing stop. Any cache the application kept in memory is lost. When you scale back up, the application starts from cold, which can take time and may cause a burst of load on databases as caches refill.

Simple Analogy

Scaling to zero is like closing a shop for the night with the shutters down but the stock still inside. Nothing is thrown away, but no customer can buy anything, and in the morning the staff need some time to switch on the lights, warm up the ovens and stack the shelves.

i
Good Habit

Before scaling something to zero, note down the previous replica number in a change record. When you restore it later, you will then know exactly how many copies were running before.

11Scaling Stateful Applications

Programs that remember things, such as databases, need extra care when their number of copies changes.

Why stateful is different

The copies of an ordinary Deployment are interchangeable. The copies of a database cluster are not. Each one may hold different data, have a fixed name and take a specific role, such as leader or follower. Kubernetes handles such programs with a StatefulSet, which gives every Pod a stable name, a stable network identity and its own storage.

The careful order

By default, a StatefulSet scales up one Pod at a time, in numbered order, and waits for each Pod to become ready before starting the next. When scaling down, it removes Pods in the reverse order, highest number first. This protects data and lets clustered programs join or leave gracefully. A setting exists to let Pods start and stop in parallel when order does not matter, but the careful order is the safe default.

Storage stays behind by default

Each Pod of a StatefulSet usually has its own persistent storage. When you scale down, the Pod disappears but its storage is normally kept, so that scaling back up reconnects the same data. Newer versions of Kubernetes include a policy that lets you choose to delete the storage automatically when scaling down, but keeping it is the cautious default and deleting data should be a conscious decision.

Simple Analogy

A StatefulSet is like a row of numbered lockers in a gym, each with its owner’s belongings. When members leave, the highest-numbered locker is closed first, but the belongings stay inside. When a member returns to that locker number, everything is still there.

Advantages

  • Orderly changes protect clustered programs and their data
  • Stable names let members find each other reliably
  • Retained storage lets a returning Pod pick up where it stopped
  • Predictable behaviour makes operations easier to plan

Disadvantages / Trade-offs

  • Scaling is slower because Pods start one after another
  • A stuck Pod can block every later Pod from starting
  • Leftover storage continues to cost money after scale-down
  • Adding a copy is rarely enough: the program itself must know how to rebalance data
!
Common Mistake

Assuming that raising a database’s replica number instantly makes it faster. Kubernetes only adds the Pods. Whether the database spreads its data or its workload across them depends on the database software and its own configuration.

12Scaling During a Rolling Update

Sometimes you need to change the number while a new version is still being rolled out. Kubernetes has a rule for that.

During a rolling update, a Deployment temporarily runs two ReplicaSets: the old version, which is shrinking, and the new version, which is growing. If you change the replica number at that moment, Kubernetes does not dump all the extra Pods on one side. Instead, it shares the change between the two ReplicaSets in proportion to their current sizes. This is called proportional scaling, and it keeps the update healthy while the capacity changes.

flowchart LR
  A["Deployment wants 10 copies"] --> B["Old ReplicaSet with 6 Pods"]
  A --> C["New ReplicaSet with 4 Pods"]
  D["Operator raises number to 15"] --> E["Change shared in proportion"]
  E --> F["Old ReplicaSet gets a larger share"]
  E --> G["New ReplicaSet gets a smaller share"]
        
FIG 4 — Extra capacity is shared between old and new versions during an update
Simple Analogy

Imagine a factory replacing old machines with new ones, day by day. If the manager suddenly asks for more total machines, the extra ones are added to both the old and new lines in the same proportions, so that the changeover keeps its rhythm.

Practical advice

Although Kubernetes handles this situation gracefully, it is usually wiser to avoid scaling in the middle of an update. Finish the rollout, confirm that everything is healthy, and then change the number. Two changes at once make it much harder to tell which one caused a problem.

i
Good Habit

If you must scale during an emergency in the middle of an update, note both actions in your change log. Later, when reviewing what happened, you will know that capacity and version were changing at the same time.

13Manual Scaling Meets Automatic Scaling and GitOps

The biggest surprise for beginners is that their manual change may quietly disappear. Here is why.

The autoscaler fights back

If a Horizontal Pod Autoscaler is attached to a Deployment, it owns the replica number. Every few moments it measures load and sets the number according to its rules. If you change the number by hand, the autoscaler notices and simply overwrites your value with its own calculation. Your change survives only until the autoscaler’s next decision, which is usually within seconds or minutes.

To take manual control of such a workload, you must first pause or remove the autoscaler, or adjust its minimum and maximum limits to force the number you want. A common trick for a temporary boost is to raise the autoscaler’s minimum number, since it will never scale below that.

A subtle trap in definition files

If your definition file contains a fixed replica number and an autoscaler is also present, every time you apply the file the number is reset to the file’s value, undoing the autoscaler’s work. The recommended practice is to leave the replica number out of the file entirely when an autoscaler manages it, so that applying the file does not interfere.

GitOps tools restore what Git says

GitOps tools continuously compare the cluster with a repository and can be configured to correct any difference automatically. If you scale by hand and the repository says a different number, the tool may quietly set the number back. The right way to scale in such environments is to commit the change to the repository.

SituationWhat happens to your manual changeWhat to do instead
Autoscaler is attachedOverwritten at the next evaluationAdjust the autoscaler’s limits, or pause it first
Definition file has a fixed number, applied laterReset to the file’s numberUpdate the file as well
GitOps tool with automatic correctionReverted to match the repositoryCommit the new number to the repository
No autoscaler, no automationStays until someone changes itRecord it in your change log
Simple Analogy

Imagine you manually turn a thermostat down, but a smart home system is programmed to keep the room at twenty-two degrees. Minutes later the heating is back on. To change the room, you must change the smart system’s programme, not fight it at the dial.

!
Common Mistake

Scaling a workload by hand during an incident, walking away, and then discovering that the autoscaler or a GitOps tool has undone the fix. Always check who else owns the replica number before relying on a manual change.

14Scaling the Machines Underneath

More Pods need more room. Sometimes the real scaling job is adding machines.

Pods run on nodes, and each node has a fixed amount of processor power and memory. When you raise the replica number beyond what the current nodes can hold, the extra Pods stay Pending. There are two ways to add room. An automatic node scaler, often called a cluster autoscaler, watches for Pending Pods and asks the cloud provider for new machines, then removes machines that sit empty. Alternatively, you can add nodes by hand, by changing the size of a node group in your cloud console or infrastructure tooling.

Order 1

Add machines first

Before a planned event, enlarge the node group so that room is ready. New Pods then start immediately after you raise the number.

Order 2

Then raise the replicas

With room available, the scheduler places Pods quickly and the scale-up completes in a short time.

Order 3

Lower replicas first when shrinking

When scaling down, reduce the Pod number first and give Pods time to finish gracefully.

Order 4

Then remove machines

Only after the Pods are gone should you shrink the node group, so that no running Pod is disrupted by the removal of its machine.

Simple Analogy

Hiring extra waiters is pointless without extra tables to serve. For a big evening, you first arrange the tables and then call the waiters. When the evening ends, you send the waiters home first and only then fold the tables away.

i
Practical Tip

Machines take minutes to arrive, while Pods take seconds. Booking capacity early is the single most effective way to make manual scale-ups smooth.

15Planning a Manual Scale-Up: Choosing the Right Number

The hardest part of manual scaling is not the command. It is deciding the number.

1

Measure what one copy can handle

Use load testing or past monitoring to learn how many requests one Pod serves comfortably, while staying within acceptable response times.

2

Estimate the expected demand

Look at previous events, marketing plans and growth trends. Ask the business teams what they expect, not just what the graphs show.

3

Divide and add a safety margin

Divide the expected demand by what one copy handles, then add a cushion, often twenty to fifty percent, for surprises and for losing a machine.

4

Check the surroundings

Confirm that databases, caches, queues and external services can handle the extra load that more copies will create.

5

Confirm room in the cluster

Compare the total requests of the new Pods with the free room on nodes and with the team’s quota. Add machines or raise the quota if needed.

6

Scale early and in steps

Increase the number well before the event, in a few steps, and watch health and response times after each step.

7

Plan the scale-down

Write down when and how to return to normal, so that the extra capacity does not stay forever and quietly inflate the bill.

Measure
capacity of a single copy
Add margin
cushion for surprises and failures
Scale early
new Pods need time to become ready
!
Common Mistake

Choosing a number by gut feeling and never checking it. Too few copies cause failures, and too many silently waste money. A small load test before a major event is almost always worth the effort.

16Security and Governance

Because scaling can stop an entire service or run up a large bill, it deserves proper access control.

Who may scale?

Kubernetes uses role-based access control to decide what each person or program may do. Scaling is a separate permission on a special part of the object called the scale subresource. This means you can give a person the right to change only the replica number, without letting them edit the rest of the Deployment. It is a neat way to let on-call staff respond to incidents without granting broad powers.

The risks

Risk 1

Accidental shutdown

Scaling a critical service to zero, by mistake or by a wrong command, causes an immediate outage.

Risk 2

Runaway cost

A mistyped extra zero can create hundreds of Pods and a very large cloud bill within minutes.

Risk 3

Resource starvation

Huge scale-ups in one team can consume the room that other teams need, unless quotas are in place.

Risk 4

Untraceable changes

Without records, nobody knows who changed the number or why, which slows down incident investigation.

Safeguard 1

Least privilege

Give scale rights only to people and tools that need them, and only on the workloads they run.

Safeguard 2

Resource quotas

Set namespace caps on Pods and compute so that no single mistake can consume the whole cluster.

Safeguard 3

Admission policies

Use policy rules to forbid dangerous values, such as zero replicas for protected production services.

Safeguard 4

Audit logging

Turn on cluster audit logs so every scale action is tied to a person or tool and a time.

i
Good Habit

For your most important services, require a second person to approve scale changes through version control, and keep a short list of emergency-only exceptions that are clearly recorded afterwards.

17Monitoring and Troubleshooting

After you turn the dial, you must watch what happens. Here is what to look at and how to read the signs.

The numbers a Deployment reports

A Deployment reports several counts, and understanding the difference between them is the key to reading its health.

CountMeaningWhat a gap tells you
Desired replicasThe number you asked forYour target
Current replicasPods that exist right nowIf lower than desired, Pods are still being created
Ready replicasPods that passed their readiness checkIf lower than current, Pods exist but are not yet useful
Available replicasPods ready for long enough to be trustedIf lower than ready, Pods have only just become ready
Updated replicasPods running the latest versionIf lower than desired during a rollout, the update is unfinished

Common symptoms and their usual causes

Pods remain Pending after scaling up

Usually the nodes lack free processor power or memory, a quota is reached, or a placement rule cannot be satisfied. Read the Pod events to see the exact reason.

Pods are running but not ready

The application is still starting, its health check is failing, or a required dependency is unavailable.

The number returns to its old value

An autoscaler, a GitOps tool or a re-applied definition file has overwritten your change. Check who else controls the replica number.

New Pods get little traffic

Long-lived connections, such as persistent streaming connections, stay attached to old Pods, because connections are balanced when they start, not while they run. Consider restarting clients or using a load balancer that rebalances.

Errors during scale-down

Requests are being cut off because the application does not finish its work on the stop signal, or the grace period is too short.

The database is overwhelmed after scale-up

More copies opened more connections. Use connection pooling, lower the per-Pod connection limit or scale the database first.

What to watch after a change

After scaling, keep an eye on response times, error rates, processor and memory use per Pod, queue lengths, restart counts and the load on downstream systems. A healthy scale-up shows falling response times and a stable error rate. A worrying one shows rising errors, restarts or a growing number of Pending Pods.

i
Practical Tip

Write a short checklist of what to inspect after every scale action, and follow it every time. When you are tired at three in the morning during an incident, a checklist is more reliable than memory.

18Anti-patterns to Avoid

These mistakes appear again and again in real clusters. Learn to recognise them early.

ANTI-PATTERN-01 Avoid
Problem

Engineers scale production by typing commands directly into the live cluster and never update the definition files.

Why It’s Harmful

The cluster drifts away from the source of truth. The next deployment or GitOps sync silently reverses the change, often at the worst possible moment.

Correct Approach

Make every planned scale change through version control. Reserve direct commands for emergencies, and update the files straight afterwards.

ANTI-PATTERN-02 Avoid
Problem

A fixed replica number is left in the definition file while an autoscaler also manages the same Deployment.

Why It’s Harmful

Every time the file is applied, the number is reset, wiping out the autoscaler’s decisions and causing sudden capacity drops.

Correct Approach

Remove the replica number from the file when an autoscaler owns it, and control the range through the autoscaler’s limits.

ANTI-PATTERN-03 Avoid
Problem

Scaling up at the last minute, when the traffic spike has already arrived.

Why It’s Harmful

New Pods and possibly new machines take minutes to become ready, so users suffer during exactly the period when scaling was needed.

Correct Approach

Scale ahead of predicted demand, and add machines before adding Pods.

ANTI-PATTERN-04 Avoid
Problem

Scaling down in one huge step, such as from many copies to a handful.

Why It’s Harmful

Remaining Pods are overloaded instantly, and no disruption budget will stop the controller from removing the others.

Correct Approach

Reduce in stages, watch the effect at each stage and keep a margin above the current load.

ANTI-PATTERN-05 Avoid
Problem

A single copy is used for an important production service because “it has always worked”.

Why It’s Harmful

Any restart, node failure or update causes a complete outage, because there is no other copy to take over.

Correct Approach

Run at least two copies of anything that matters, spread across different machines or zones.

ANTI-PATTERN-06 Avoid
Problem

Extra capacity added for an event is never removed afterwards.

Why It’s Harmful

The cloud bill quietly stays high for months, and nobody remembers why so many copies are running.

Correct Approach

Record a return date with every temporary scale-up, and set a reminder or a scheduled task to return to normal.

19Best Practices and Common Mistakes

A short checklist of good habits, in the order you are likely to need them.

1

Design applications to be scalable

Keep copies interchangeable, store state outside the Pod, and make sure the program can start quickly and stop cleanly.

2

Set realistic resource requests

Accurate processor and memory requests help the scheduler place Pods well and make capacity calculations trustworthy.

3

Define readiness checks properly

A good check ensures that a new copy only receives traffic once it can truly serve it, which is vital for smooth scale-ups.

4

Handle the stop signal gracefully

Make sure the application finishes its current requests when told to stop, and tune the grace period to match the longest normal request.

5

Spread copies across machines and zones

Use placement rules so that one machine or one zone failing never removes every copy at once.

6

Keep the source of truth updated

Record every change in version control, even the emergency ones, so the cluster and the files agree.

7

Scale in steps and watch

Change the number in moderate steps, observe response times and errors, and only then continue.

8

Document and review

Write a short runbook for each service explaining normal, busy and emergency replica numbers, who may change them and how to return to normal.

!
Frequent Beginner Slip

Believing that more copies always means better performance. If the real bottleneck is a database, a slow external service or a shared lock, adding copies changes nothing, or even makes things worse. Find the bottleneck before turning the dial.

20Real-World and Industry Examples

See how ordinary teams use manual scaling every day.

Festival sales at an online retailer

The team knows the exact start time of a big sale. A day before, they enlarge the node group, then raise the checkout and catalogue services in steps. After the sale, they scale back over several hours, watching the load fall.

Results day at an education portal

An examination results website is nearly idle most of the year. Before the announcement, operators scale it to many times its normal size, and a day later return it to a small number.

Night-time savings for development environments

A software company scales every development and testing workload to zero each evening and restores it each morning using a scheduled routine, cutting compute costs significantly.

Emergency containment

A background worker begins sending duplicate emails to customers. The on-call engineer scales it to zero within seconds, stopping the damage while the fault is investigated.

Database maintenance windows

Before upgrading a database, teams scale the applications that write to it down to zero, perform the upgrade, and bring the applications back one service at a time.

Load testing before launch

Engineers scale a staging copy of a new service to different sizes to find out how many copies are needed for the expected traffic, and use the result to choose the production number.

Steady, predictable internal tools

A payroll application has the same small number of users all year. A fixed number of copies, chosen once and reviewed quarterly, is simpler and cheaper to run than an automatic scaler.

21Advantages and Trade-offs

Every approach has strengths and limits. Knowing both keeps your expectations realistic.

Advantages

  • Simple to understand, because there is only one number to change
  • Predictable capacity, with no surprises from automatic decisions
  • Lets you use knowledge that machines lack, such as planned events
  • Fast to apply in emergencies, including stopping a workload instantly
  • Needs no extra tools or measurements to get started
  • Works for every kind of scalable workload

Disadvantages / Trade-offs

  • Depends on a person noticing and acting in time
  • Cannot react to sudden, unexpected surges
  • Extra capacity may be forgotten and waste money
  • Direct changes can drift from the source of truth
  • Risk of human error, such as a wrong number or wrong workload
  • Does not scale down by itself when demand falls
Simple Analogy

Manual scaling is like driving a car with a manual gearbox. It gives you full control and can be very efficient in skilled hands, but it demands attention. Automatic scaling is like an automatic gearbox: comfortable in daily traffic, though it cannot know that a steep hill is coming around the corner.

22Frequently Asked Questions

Quick answers to the questions beginners ask most often.

Q1Does manual scaling restart my existing Pods?

No. Changing only the replica number adds or removes Pods without touching the ones that keep running, because the Pod template has not changed.

Q2Why did my replica number change back by itself?

Most likely an autoscaler, a GitOps tool or a re-applied definition file overwrote it. Check who else controls the number, and change it at the source.

Q3Can I scale a Deployment to zero?

Yes. All Pods are removed but the Deployment remains, so raising the number later brings the application back. Requests fail while it is at zero.

Q4Which Pods are removed first when I scale down?

Kubernetes prefers Pods that are not yet placed, not ready, on crowded nodes or newer, and you can give some Pods a lower deletion cost as a hint to remove them earlier.

Q5Why are my new Pods stuck in Pending?

The cluster probably lacks free room, a quota is reached or a placement rule cannot be met. The Pod’s events explain the exact reason.

Q6Can I scale a DaemonSet?

Not by a replica number. A DaemonSet runs one Pod on each matching node, so you change the count by changing the number of nodes or the rule that selects them.

Q7Is manual scaling better than automatic scaling?

Neither is always better. Manual suits planned events, steady workloads and emergencies. Automatic suits unpredictable daily variation. Many teams combine both.

Q8Does a Pod Disruption Budget protect me when I scale down?

No. Disruption budgets protect against voluntary evictions such as draining a node, but a Deployment removing Pods to match a lower number is not blocked by them.

Q9What is the difference between scaling and updating?

Scaling changes how many copies run. Updating changes what each copy is, such as a new image version, and triggers a rolling replacement of Pods.

Q10How do StatefulSets scale differently from Deployments?

They add Pods one at a time in numbered order and remove them in reverse order by default, and they normally keep each Pod’s storage when scaling down.

Q11Should I add machines or Pods first?

When scaling up, add machines first so that room exists. When scaling down, remove Pods first and only afterwards shrink the machines.

Q12Do more copies always mean better performance?

No. If the real bottleneck is a database or an external service, adding copies may not help and can even make the problem worse.

23Summary and Key Takeaways

You began this guide at a tea stall, deciding for yourself how many helpers to call for a busy day. Manual scaling in Kubernetes is that same decision, made with a single number: how many copies of your application should run. You saw how the request travels through the API Server, the controllers, the scheduler and the kubelet, how a scale-up can be blocked by room, quotas, images or health checks, and how a scale-down chooses Pods and stops them gracefully. You learned the special rules for scaling to zero, for stateful applications and for rolling updates, and you discovered why a manual change can vanish when an autoscaler or a GitOps tool also owns the number. Above all, you learned that the command is the easy part: the real skill is choosing the right number, at the right time, with the right room underneath, and recording the change so that the cluster and its files always agree.

Key Takeaways

  • Manual scaling changes one number — the desired replica count — and Kubernetes controllers do all the real work of creating or removing Pods.
  • It is not a rollout — changing only the count adds or removes copies without restarting the ones that keep running.
  • Scale-ups can be blocked — free room on nodes, namespace quotas, placement rules, image downloads and readiness checks all decide whether new Pods become useful.
  • Scale-downs need care — Pods are chosen by preference, stopped gracefully, and are not protected by disruption budgets, so reduce in steps.
  • Watch who else owns the number — autoscalers, GitOps tools and re-applied files can silently undo a manual change.
  • Stateful and zero cases are special — StatefulSets scale in order and keep storage, and scaling to zero pauses an application without deleting it.
  • Plan, record and secure — choose the number from measurements, add machines first, scale early, restrict who may scale, and keep the source of truth updated.