Set CPU and memory limits for database nodes

Hybrid Manager allows you to configure CPU and memory requests and limits for Postgres instances running on Kubernetes.

These settings directly affect how Kubernetes schedules your workloads, and help prevent resource contention or overuse on shared nodes.

Why this matters

Kubernetes uses these settings to:

  • Reserve resources on the node (via requests)
  • Enforce limits to prevent a container from exceeding its allowed usage (via limits)

If you set too little, your Pods may be evicted or OOMKilled. If you set too much, Kubernetes may be unable to schedule your Pod.

How to set

You can configure CPU and memory values when:

  • Creating a cluster (via the Cluster Settings screen)
  • Editing an existing cluster
  • Editing a cluster template

From the UI

  1. Go to Clusters
  2. Click Create Cluster or Edit Cluster
  3. Under DB Configuration, set:
- `CPU Requests` (e.g., `500m`)
- `CPU Limits` (e.g., `1`)
- `Memory Requests` (e.g., `2Gi`)
- `Memory Limits` (e.g., `4Gi`)

These values apply to each Postgres Pod (per instance).

From the Cluster YAML

Alternatively, you can define the following in your Cluster custom resource:

spec:
instances:
- name: postgres
resources:
requests:
cpu: "500m"
memory: "2Gi"
limits:
cpu: "1"
memory: "4Gi"

Save and apply using:

kubectl apply -f your-cluster.yaml

Best practices

  • Start conservative and monitor usage with kubectl top pods and the built-in dashboards
  • Consider your node types and total allocatable resources
  • Use limits to protect the cluster from noisy neighbors

For more information, see Kubernetes resource management.


Could this page be better? Report a problem or suggest an addition!