Declarative configuration specifies the desired state of resources while leaving Kubernetes to determine and perform the actions needed to reach it. Kubernetes manifests can manage several resources in a single file, providing a consistent model for application deployment. section 3.2.4
Kubernetes maintains declared state through control loops. Each loop repeatedly compares a resource’s current state with its desired state and takes corrective action when they differ. For a deployment configured with three Pod replicas, a ReplicaSet creates a replacement if one is accidentally deleted. section 3.2.4
Declarative configuration differs from imperative resource management in how deployment responsibility is assigned:
- Declarative: define what the system should contain in Kubernetes manifests; the platform determines how to achieve that state. section 3.2.4
- Imperative: issue commands such as create, run, and delete, specifying the individual steps required to build the deployment. section 3.2.4
Replica recovery
A deployment declares three Pod replicas. If one Pod disappears, the ReplicaSet control loop detects the mismatch and creates another Pod until the current count again equals the declared count. section 3.2.4





