Extend Kubernetes with a CustomResourceDefinition and run Postgres through an operator that handles failover. Then share the cluster between two teams: ResourceQuotas cap what each may request, LimitRanges fill in defaults, and Karpenter launches and consolidates nodes to fit their pods. Or press ▶ Guided tour.
A CustomResourceDefinition teaches the API server a new kind of object, with validation and kubectl support, and an operator is a controller that acts on it with domain knowledge: here it turns one Cluster object into a replicated Postgres and performs failover. ResourceQuotas cap the total a namespace may request and are enforced at admission, so excess pods are never created; LimitRanges add default requests and limits to pods that set none. Karpenter watches for pods the scheduler can't place, launches the cheapest instance type that fits them, and consolidates underused nodes away.