A stable address remains associated with a workload identity when its underlying pod is replaced or relocated. Distributed systems such as MongoDB replica sets need this identity so replicas and clients can reconnect reliably. section 16.1.1
A stateful replica deployment requires:
- A separate PersistentVolume for each pod. section 16.1.1
- A unique address for every pod. section 16.1.1
- The same address and PersistentVolume after pod deletion and replacement. section 16.1.1
Per-replica services
Associate each replica with its own Deployment, Service, and PersistentVolumeClaim. The Service provides an address that continues resolving to the replica's pod when Kubernetes recreates that pod elsewhere. A separate client-facing Service can expose all replicas through one address. section 16.1.1
Figure 16.2 Providing each replica with its own volume and address
View the architecture connecting each replica to its own volume and stable address. section 16.1.1
