...

/

Scaling Up/Down Our Application

Scaling Up/Down Our Application

Learn how we can scale up and scale down our replicas.

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:

Press + to interact
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 ...

Access this course and 1400+ top-rated courses and projects.