top of page

Kubernetes PDB: Why We Swapped to Using maxUnavailable – A Case Study with Ananta Cloud

 

Table of Contents:

 
Kubernetes pod disruption budget (PDB)

Problem Statement

As the adoption of Kubernetes continues to grow in the cloud-native ecosystem, so does the challenge of managing workloads at scale, ensuring high availability, and maintaining operational efficiency. One of the customers of Ananta Cloud, a leading cloud services provider, faced a critical issue: their Kubernetes deployment strategy was causing service interruptions during rolling updates, which impacted both uptime and user experience.


The primary challenge stemmed from the PodDisruptionBudget (PDB) settings in Kubernetes. These settings weren't optimized for their deployment patterns, leading to over-constrained availability during maintenance events and scaling operations. As a result, the customer's service experienced frequent slowdowns and outages, affecting the reliability of their application. The team needed a more flexible and efficient approach to manage pod disruptions without sacrificing service availability.

Understanding the Problem

PodDisruptionBudgets (PDBs) in Kubernetes help define how many pods can be disrupted during voluntary disruptions (such as rolling updates, node drains, or scaling operations). There are two primary configuration options within a PDB:


  1. maxUnavailable: Specifies the maximum number of pods that can be unavailable during a disruption.

  2. minAvailable: Defines the minimum number of pods that must remain available at any given time.


In this case, the customer had been using the minAvailable configuration, which seemed like a straightforward choice. However, this led to several challenges that started to negatively impact their service.

The Default Configuration Challenge

When the customer used the `minAvailable` setting in their PDBs, they encountered several issues:


  1. Underutilization of Resources: A high value for minAvailable forced Kubernetes to maintain a large number of pods, leading to resource inefficiency during scaling events. Resources that could have been used elsewhere remained idle, contributing to an increased cost of operations.

  2. Longer Update Windows: During rolling updates, Kubernetes would wait until a sufficient number of pods were available before allowing any disruption to occur. This caused updates to take longer and delayed the deployment of new features or fixes.

  3. Availability Constraints: With the minAvailable setting, the system was sometimes unable to ensure enough pods were available to handle traffic, leading to performance degradation during disruptions.


Given these issues, the customer needed a solution that allowed for more flexibility and better resource management during rolling updates and scaling events.

Switching to maxUnavailable: The Solution

After careful consideration, Ananta Cloud implemented the maxUnavailable strategy for PodDisruptionBudgets, which turned out to be the ideal fit for this customer’s needs. Here’s why this change was impactful:


Optimized Resource Utilization

By configuring maxUnavailable to a specific number (e.g., 1 or 2 pods), Kubernetes was able to terminate and reschedule pods more freely. This allowed the system to optimize resource usage while maintaining service availability. The customer was able to scale up or down without unnecessary delays, ensuring resources were used more efficiently.

Faster Rolling Updates

Switching to maxUnavailable significantly sped up the rolling updates. Kubernetes no longer had to wait for a minimum number of pods to be available before starting the update. By allowing a defined number of pods to be disrupted, updates could proceed faster, reducing the overall downtime and minimizing service interruptions.

Better Control Over Disruptions

With maxUnavailable, Ananta Cloud was able to provide the customer with precise control over the number of disruptions that could occur at any given time. This meant the customer could perform updates and maintenance with confidence, knowing that only a limited number of pods would be affected, which helped prevent large-scale outages.

Improved Availability During Scaling Events

Scaling operations, whether up or down, were handled more predictably with maxUnavailable. By not having to preserve a strict minimum number of available pods, Kubernetes could handle pod replacements and scaling events more efficiently. This ensured that the customer’s application remained highly available throughout these operations.


Results for the Customer

After implementing the maxUnavailable strategy for this customer’s Kubernetes deployment, Ananta Cloud saw immediate and noticeable improvements:


  • Higher Availability: The customer’s application experienced fewer downtimes during rolling updates and scaling operations. The flexible disruption policy ensured that the system could maintain availability even during maintenance events.

  • Improved Customer Satisfaction: The customer saw enhanced uptime and performance, which led to increased confidence in the cloud platform. Their end-users experienced fewer service interruptions, improving their overall experience.

  • Operational Efficiency: Kubernetes was able to handle scaling and updates with greater efficiency, allowing the customer to optimize their resource allocation and reduce costs associated with unused capacity.

Conclusion

For this customer, the switch to maxUnavailable in their Kubernetes PodDisruptionBudgets was a key decision in optimizing their cloud-native infrastructure. It allowed them to maintain a better balance between high availability, resource efficiency, and the speed of updates. With this approach, Ananta Cloud was able to ensure that the customer could scale their application seamlessly while maintaining the reliability and performance their end-users expected.


As Kubernetes evolves, it’s important to continuously adapt deployment strategies. By leveraging maxUnavailable in PodDisruptionBudgets, Ananta Cloud was able to help this customer optimize their system for both performance and reliability, making it a win-win solution for all parties involved.


Reach out to Ananta Cloud for expert Kubernetes consulting and optimize your cloud infrastructure. Get in touch today to discuss how we can help you scale with confidence.







Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
average rating is 4 out of 5, based on 150 votes, Recommend it

Subscribe For Updates

Stay updated with the latest cloud insights and best practices, delivered directly to your inbox.

91585408_VEC004.jpg
Collaborate and Share Your Expertise To The World!
Ananta Cloud welcomes talented writers and tech enthusiasts to collaborate on blog. Share your expertise in cloud technologies and industry trends while building your personal brand. Contributing insightful content allows you to reach a broader audience and explore monetization opportunities. Join us in fostering a community that values your ideas and experiences.
business-professionals-exchanging-handshakes.png
bottom of page