Search⌘ K
AI Features

Scaling Up/Down Our Application

Explore scaling Kubernetes applications by adjusting replica counts in deployment manifests. Learn to increase or decrease pods smoothly while understanding container scheduling in multi-node clusters to maintain application availability.

Scaling Up Our Application

Another cool thing that deployments can do is scale up and down the number of replicas we have running. Right now, we are running a single container for our application. Changing that is just a matter of updating our manifest file with our new desired number of replica and sending that to Kubernetes:

YAML
apiVersion: apps/v1
kind: Deployment
metadata:
name: hellok8s
spec:
replicas: 10
selector:
matchLabels:
app: hellok8s
template:
metadata:
labels:
app: hellok8s
spec:
containers:
- image: brianstorti/hellok8s:v1
name: hellok8s-container

The manifest is exactly the same except for the replicas field that ...