We have seen in the spec of the ReplicaSet and Deployment a replicas field. This field indicates how many replicas of a Pod should be running.
Manual Scaling
In declarative form, it is
possible to edit the spec of the Deployment to change the value of this field:
apiVersion: apps/v1 kind:
Deployment
metadata:
name: nginx
labels:
app: nginx
spec:
replicas: 4
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: nginx
name: nginx
In imperative ...