ReplicaSets
A ReplicaSet ensures that a specified number of identical Pod replicas are running at any given moment.
1. Deployment vs ReplicaSet
Section titled “1. Deployment vs ReplicaSet”In production, you rarely create ReplicaSets directly. Deployments create and manage ReplicaSets automatically:
Deployment (Version 2) │ ├──► ReplicaSet v1 (Replicas: 0) ──► Pods v1 (Terminated) │ └──► ReplicaSet v2 (Replicas: 3) ──► Pods v2 (Running)If a Pod crashes, the ReplicaSet controller detects the missing replica and issues a new Pod creation request to the API Server.