Skip to content
  • Home
  • About
  • No Access
  • Privacy Policy
Bits of .NET
Bits of .NET
  • C#
  • Asp.Net Core
  • SQL
  • Windows
  • WordPress
  • AI
  • JavaScript
  • CSS
  • MORE
    • HTML
    • Ajax
    • Git
    • Docker
    • Kubernetes
    • Photoshop
    • Visual Studio

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • C#
  • Asp.Net Core
  • SQL
  • Windows
  • WordPress
  • AI
  • JavaScript
  • CSS
  • MORE
    • HTML
    • Ajax
    • Git
    • Docker
    • Kubernetes
    • Photoshop
    • Visual Studio
Kubernetes

Kubernetes: Fix a Mutating Webhook Timing Out Under Node Pressure

- 25.11.26 - ErcanOPAK

☸️ Kubernetes: Fix a Mutating Webhook Timing Out Under Node Pressure

A mutating admission webhook with failurePolicy: Fail has to respond to every pod creation request across the cluster, including the ones needed to reschedule pods that just got evicted during a node memory or CPU pressure event — if the webhook’s own pod can’t stay scheduled or responsive during that same pressure, its timeouts start blocking all new pod admission, which includes the exact pods the cluster needs to create to recover, turning a single-node incident into a cluster-wide scheduling outage.

🔎 The Problem

# webhook config - this is the part that turns an outage into a worse one
webhooks:
  - name: inject-sidecar.example.com
    failurePolicy: Fail      # blocks ALL pod admission if unreachable
    timeoutSeconds: 10       # long enough to stall every other pod create
# webhook deployment: replicas: 1, no priorityClassName set
# -> first thing evicted under node pressure, and single point of failure

✅ Fix: Make the Webhook Fail Safe and Survive the Pressure It Guards Against

  • Set failurePolicy: Ignore for anything non-critical, so a temporarily unreachable webhook doesn’t block scheduling exactly when the cluster needs to reschedule pods the most.
  • Give the webhook’s own deployment a priorityClassName high enough that it isn’t the first thing evicted under pressure, and a low enough timeoutSeconds that a slow response fails fast instead of stalling every other pod admission.
  • Run at least two replicas across separate nodes with proper pod anti-affinity, so losing one node to pressure doesn’t take down the single admission path every other pod creation depends on.

🚨 Why This Is Dangerous

  • A failurePolicy: Fail webhook that can’t respond turns a node-pressure incident into a total scheduling outage, because the exact mechanism the cluster needs to reschedule evicted pods elsewhere is the one blocked by the webhook timing out.

A webhook that fails closed is only as safe as its own ability to stay up during the exact kind of incident it was written to handle.

— Cloud Architect

Related posts:

Kubernetes: Use Priority Classes to Ensure Critical Pods Run First

Kubernetes: Use Priority Classes to Ensure Critical Pods Run First

Kubernetes Deployments Succeed But Traffic Fails

Kubernetes Deployments Succeed But Traffic Fails

Kubernetes: Fix a Rolling Update That Takes Down Every Pod at Once Because maxUnavailable Was Left a...

Kubernetes: Fix a Rolling Update That Takes Down Every Pod at Once Because maxUnavailable Was Left a...

Views: 9
Found this useful? Share it
XLinkedInWhatsApp

Post navigation

Windows 11: Fix Dynamic Lock Missing a Disconnected Phone
Ajax: Fix a Response Interceptor Firing Before the Request Ends

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Most Read

  1. 01How to make theater mode the default for Youtube 1,079 views
  2. 02How to add default value for Entity Framework migrations for DateTime and Bool 997 views
  3. 03Get the User Name and Domain Name from an Email Address in SQL 996 views
  4. 04Get the First and Last Word from a String or Sentence in SQL 873 views
  5. 05How to select distinct rows in a datatable in C# 868 views
  6. 06How to enable, disable and check if Service Broker is enabled on a database in SQL Server 671 views
  7. 07Add Constraint to SQL Table to ensure email contains @ 631 views
  8. 08Average of all values in a column that are not zero in SQL 584 views
  9. 09How to use Map Mode for Vertical Scroll Mode in Visual Studio 562 views
Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
Back to top
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com