Since we saved the configuration, we can apply an updated definition of the ReplicaSet. For example, we can use go-demo-2-scaled.yml file that differs only in the number of replicas set to 4.
We could have created the ReplicaSet with apply in the first place, but we didn’t. The apply command automatically saves the configuration so that we can edit it later on. The create command does not do such thing by default so we had to save it with --save-config.
1
kubectl apply -f go-demo-2-scaled.yml
Apply changed definition of 'go-demo-2'
This time, the output is slightly different. Instead of saying that the ReplicaSet was created, we can see that it was “configured”.