Skip to content

Custom Readiness or Startupprobes #4159

Open
@jbierboms

Description

@jbierboms

Overview

We aim to mitigate unnecessary outages during Kubernetes node updates or drains by specifying custom readiness or startup probes for a PostgresCluster.

Background

In this particular case we used a PostgresCluster with replica 2.

The Node running the replica was drained and therefor a new pod was created on a different node.
Because of some infrastructure-related problems this move did take some time. This resulted into a situation where the replica wasn't able to restart immediately and had to some archive restoring.
However the replica already had status "ContainersReady" (during the restore), which allowed the master pod to be moved from its node. During that time we saw an outage until the master was ready again, the replica also had the problem of logging "following a different leader because i am not the healthiest node" until the master was ready.

Use Case

To fill this gap, we propose implementing custom readiness or startup probes for PostgresCluster, ensuring that the system can accurately determine when the replica is fully functional and ready to handle traffic. This will prevent unnecessary outages and reduce the impact of node updates or drains on the cluster's overall availability.

Environment

  • Platform: Kubernetes
  • Number of Postgres clusters: 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions