Pod Disruption Budgets (PDBs) in Kubernetes limit the number of replica pods of an application that can be unavailable simultaneously during voluntary disruptions. In the context of Spot Ocean, which automates Kubernetes scaling and optimization, respecting PDBs is essential to maintain workload availability. Ocean integrates with Kubernetes eviction APIs and includes additional safeguards to protect workloads during node lifecycle operations.
Default Kubernetes PDB drain behavior
For non-Ocean clusters, if two pods sharing the same PDB are scheduled on one node and the PDB is configured with maxUnavailable=1, draining the node after cordoning will result in only one pod being marked as TERMINATING at a time by the scheduler.
This behavior is documented in the Kubernetes documentation.
Default Ocean PDB drain behavior
Ocean uses a conservative, safety-first approach when draining nodes. If there is even a small chance a PDB could be violated, Ocean cancels the scale down or replacement and logs this information in the user interface. In the same example above, Ocean does not attempt to drain, scale down, or replace the node due to the potential violation.
Why Ocean uses a conservative approach
Ocean supports diverse customer environments with varying PDB configurations. Avoiding unintended PDB violations helps prevent application downtime. Scenarios for caution include:
-
A workload with a PDB allowing only one pod down while cumulative terminationGracePeriodSeconds exceeds the node drain timeout.
-
Multiple nodes containing pods under the same PDB being drained in the same operation, which could violate availability limits.
-
Additional involuntary events in Ocean-managed clusters, such as spot interruptions, node replacements, or autoscaling actions, increase the complexity of maintaining PDB compliance.
Additional Options
Ocean offers internal configuration options at the account or group level that modify default PDB behavior, such as shouldIgnorePdbDuringScaleDown. Enabling this allows the autoscaler to proceed with actions it previously canceled, functioning more like the default Kubernetes behavior.
Despite the name, enabling this setting does not automatically violate PDBs:
Ocean still uses Kubernetes eviction APIs and attempts graceful drains while respecting PDB constraints. However, there remains a chance of violating a PDB to complete the scale down or replacement.
Available internal PDB-related configurations include:
-
shouldIgnorePdbDuringOutOfStrategy -
shouldIgnorePdbDuringRevertToReserved -
shouldIgnorePdbDuringUnderutilizedInstances -
shouldIgnorePdbDuringScaleDown -
shouldIgnorePdbDuringIncreaseCoverage
Outcome
Understanding these behaviors helps you anticipate how Ocean interacts with Kubernetes PDBs and plan for scenarios that require specific configuration adjustments.
Related Articles
Understanding the relationship between Ocean draining timeout and Kubernetes pod terminationGracePeriod 20Number of Views Ocean Autoscaler handling of Kubernetes ephemeral-storage requests 10Number of Views How the cooldown parameter works in Ocean 31Number of Views Understanding ECS draining behavior and default timeout in Ocean 25Number of Views Work with Command Events at Build Time 6Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago