Skip to main content

📈 Scale

Scaling is adjusting capacity to demand. There are two levels, and each is done in a different place:

LevelWhat changesWhere to do it
Pods (replicas)How many copies of the application runkubectl
Nodes (workers)How many servers the cluster hasNuvion Panel

If pods request more resources than the nodes have, they stay Pending. In that case you also need to increase the nodes.


🚀 Before you start​

  • Have cluster access configured (see Cluster Access).
  • Have the web-deploy Deployment from the Deploy page.

Scaling pods​

🚀 1. Increase the number of replicas​

kubectl scale deployment web-deploy --replicas=4
kubectl get pods -l app=web-deploy

4 pods appear. The new ones may take a few seconds to become Running.

🚀 2. Decrease​

kubectl scale deployment web-deploy --replicas=2

🚀 3. Scale automatically (HPA)​

The HPA adjusts replicas according to CPU usage:

kubectl autoscale deployment web-deploy --cpu-percent=50 --min=2 --max=5
kubectl get hpa

This keeps between 2 and 5 pods, increasing when average CPU usage exceeds 50%. The HPA depends on the Metrics Server and on the CPU requests defined in the Deployment (already present in the Deploy page template).

tip

If the TARGETS column shows unknown, wait 1 to 2 minutes for the Metrics Server to collect data.

Scaling nodes​

🚀 4. See the nodes​

  1. Go to Compute > Kubernetes and click the cluster name.
  2. In the side panel, see the Workers section, which shows the group (for example, default-worker) and the number of workers.

🚀 5. Change the number of workers​

Changing nodes is done only in the Nuvion Panel:

  1. In the Workers section, open the group editor (default-worker).
  2. In the Edit workers window, set the number of workers:
    • With Autoscaling enabled, enter the Minimum and Maximum.
    • For a fixed number, disable autoscaling.
  3. Click Save.

✅ How to know it worked​

  • Pods: kubectl get deployment web-deploy shows the new number under READY.
  • Nodes: kubectl get nodes shows the new nodes with STATUS Ready, after a few minutes.

❗ Common problems​

SymptomCauseSolution
New pods stay PendingThe nodes have no free resourcesIncrease the workers (step 5)
HPA shows unknownMissing metric or CPU requestsWait for the Metrics Server and check the Deployment
Number of replicas goes back to the previous oneThe HPA is in controlRemove it with kubectl delete hpa web-deploy
New node is slowServer creation takes a few minutesWait and follow with kubectl get nodes --watch

🧹 Cleanup​

kubectl delete hpa web-deploy
kubectl scale deployment web-deploy --replicas=2

➡️ Next step: Restart

🧠 Questions?​

Talk to our SaveinCloud technical support team!