Disabling the PodDisruptionBudget (PDB) for the management EDB database

Disable PDB for single replica management subsystems.

About this task

Some maintenance scenarios require that Postgres is shutdown, and on one replica deployments the PDB prevents this. You can disable the PodDisruptionBudget by setting the nodeMaintenanceWindow to inProgress: true and reusePVC: true.

Procedure

  1. Identify the name of your Postgres cluster:
    kubectl -n <management namespace> get cluster
    Example:
    NAME                       AGE   INSTANCES   READY   STATUS                     PRIMARY
    apic-management-site1-db   95d   1           1       Cluster in healthy state   apic-management-site1-db-1
  2. Edit the Postgres cluster:
    kubectl -n <management namespace> edit cluster <cluster name>
  3. Add the following to the spec: section
    spec:
      nodeMaintenanceWindow:
        inProgress: true
        reusePVC: true
  4. Verify that the PDB is no longer present.
    kubectl -n <management namespace> get pdb

    should return empty.

What to do next

Complete whatever task required PDB disablement, then edit the Postgres cluster and remove the spec.nodeMaintenanceWindow section to enable PDB.