Kubernetes creates a second ReplicaSet, where it deploys the new pods and removes the old one from the original ReplicaSet
2 Types of Update Strategies in Kubernetes.
Recreate: Removes the previous version and loads the new, good for development(interrupting the service).
RollingUpdate (default): it updates to a new version gradually based on configured parameters.
The parameters are:
maxUnavailable: The number/percentage of pods that can be unavailable during the update.
maxSurge: The number/percentage of pods that can exceed the replicas requested.
minReadySeconds: The number(only) of seconds to wait before the next pod’s creation.