A StackGres cluster is basically a StatefulSet where each pod is a database instance. The StatefulSet guarantees that each pod is always bound to its own persistent volume. Therefore, the database instance data will be mapped to the state of a Patroni instance inside kubernetes.
We use a pattern called sidecar where a main application runs in a container and other containers co-located in the same pod are providing side functionalities like connection pooling, export of stats, edge proxying, logging dispatcher or database utilities.
UDS: Unix Domain Socket