<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Varsharani Hawanna</title>
    <description>The latest articles on DEV Community by Varsharani Hawanna (@varsha_hawanna_dd6f8e053e).</description>
    <link>https://dev.to/varsha_hawanna_dd6f8e053e</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4077798%2F3a613a97-bcd0-4f56-9640-13b5c45aa777.png</url>
      <title>DEV Community: Varsharani Hawanna</title>
      <link>https://dev.to/varsha_hawanna_dd6f8e053e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/varsha_hawanna_dd6f8e053e"/>
    <language>en</language>
    <item>
      <title>CloudNativePG Admission Webhook Timeout on GKE Autopilot: Root Cause, Troubleshooting and Production Fix</title>
      <dc:creator>Varsharani Hawanna</dc:creator>
      <pubDate>Tue, 18 Aug 2026 12:01:16 +0000</pubDate>
      <link>https://dev.to/varsha_hawanna_dd6f8e053e/cloudnativepg-admission-webhook-timeout-on-gke-autopilot-root-cause-troubleshooting-and-5gll</link>
      <guid>https://dev.to/varsha_hawanna_dd6f8e053e/cloudnativepg-admission-webhook-timeout-on-gke-autopilot-root-cause-troubleshooting-and-5gll</guid>
      <description>&lt;h2&gt;
  
  
  Solving CloudNativePG Admission Webhook Timeouts on GKE Autopilot
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Tags&lt;/strong&gt;: &lt;code&gt;kubernetes&lt;/code&gt; &lt;code&gt;gke&lt;/code&gt; &lt;code&gt;cloudnativepg&lt;/code&gt; &lt;code&gt;devops&lt;/code&gt; &lt;code&gt;postgresql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Originally published on the &lt;a href="https://community.ibm.com/community/user/blogs/varsharani-hawanna/2026/07/27/cloudnativepg-admission-webhook-timeout-on-gke-aut" rel="noopener noreferrer"&gt;IBM Community&lt;/a&gt; and republished here to make the content accessible to a wider technical audience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Admission webhooks are a critical component of Kubernetes operators. When a custom resource is created or modified, the Kubernetes API server communicates with the appropriate admission webhook to validate or mutate the request.&lt;/p&gt;

&lt;p&gt;While deploying a PostgreSQL cluster using the CloudNativePG (CNPG) operator on Google Kubernetes Engine (GKE) Autopilot, we encountered an admission webhook timeout that prevented the PostgreSQL cluster from being created.&lt;/p&gt;

&lt;p&gt;The issue was initially observed with EnterpriseDB (EDB) Postgres for Kubernetes, but our investigation showed that the problem was not specific to EDB or PostgreSQL.&lt;/p&gt;

&lt;p&gt;Instead, the issue was related to how Kubernetes control-plane traffic interacts with restrictive NetworkPolicies in GKE Autopilot.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This article covers:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The symptoms we observed&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How we investigated the issue&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What we learned while working with Google Cloud Support&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The root cause&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The NetworkPolicy change that resolved the issue&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Recommendations for troubleshooting similar webhook problems&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Although CloudNativePG is used as the example, the same troubleshooting approach can apply to other Kubernetes operators and applications that rely on admission webhooks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Environment
&lt;/h2&gt;

&lt;p&gt;The issue was reproduced in the following environment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Google Kubernetes Engine (GKE) Autopilot&lt;/li&gt;
&lt;li&gt;Kubernetes v1.35&lt;/li&gt;
&lt;li&gt;CloudNativePG (CNPG) Operator&lt;/li&gt;
&lt;li&gt;Admission webhook enabled&lt;/li&gt;
&lt;li&gt;PostgreSQL deployment using CloudNativePG/EnterpriseDB&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Problem: Admission Webhook Timeout
&lt;/h2&gt;

&lt;p&gt;During PostgreSQL deployment, the Kubernetes API server failed while invoking the CloudNativePG admission webhook.&lt;/p&gt;

&lt;p&gt;A typical error looked like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;failed calling webhook "mcluster.cnpg.io":&lt;br&gt;
Post "https://cnpg-webhook-service.&amp;lt;namespace&amp;gt;.svc:443/...":&lt;br&gt;
dial tcp &amp;lt;webhook-ip&amp;gt;:9443: i/o timeout&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;As a result, the PostgreSQL custom resource could not be successfully created.&lt;/p&gt;

&lt;p&gt;At first glance, the error appeared to indicate a problem with the webhook itself.&lt;/p&gt;

&lt;p&gt;However, the webhook Pod was healthy.&lt;/p&gt;

&lt;p&gt;That led us to investigate the &lt;strong&gt;connectivity path between the Kubernetes API server and the webhook.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Who Can Be Affected?
&lt;/h2&gt;

&lt;p&gt;This issue is not limited to a specific PostgreSQL distribution.&lt;/p&gt;

&lt;p&gt;It can potentially affect:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CloudNativePG Operator&lt;/li&gt;
&lt;li&gt;EnterpriseDB Postgres for Kubernetes&lt;/li&gt;
&lt;li&gt;Applications built on top of CloudNativePG&lt;/li&gt;
&lt;li&gt;Other Kubernetes workloads using admission webhooks&lt;/li&gt;
&lt;li&gt;Workloads protected by restrictive NetworkPolicies on GKE Autopilot&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A useful symptom to look for is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;The webhook is healthy and reachable from application Pods, but the Kubernetes API server reports webhook timeout errors.&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Initial Observations
&lt;/h2&gt;

&lt;p&gt;We first verified the health of the components involved in the webhook communication.&lt;/p&gt;

&lt;p&gt;The following components were working as expected:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CloudNativePG webhook Pod was running&lt;/li&gt;
&lt;li&gt;Kubernetes Service was healthy&lt;/li&gt;
&lt;li&gt;DNS resolution was working&lt;/li&gt;
&lt;li&gt;Other Pods inside the cluster could connect successfully to the webhook&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, one important component could not communicate with the webhook:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Kubernetes API server&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This changed the direction of our investigation.&lt;/p&gt;

&lt;p&gt;Instead of focusing on the webhook implementation, &lt;strong&gt;we started investigating control-plane-to-webhook connectivity&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why Was This Unexpected?
&lt;/h2&gt;

&lt;p&gt;The same deployment worked successfully on a &lt;strong&gt;GKE Standard cluster&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Google Cloud documentation recommends allowing control-plane traffic using the cluster's masterIpv4CidrBlock when configuring firewall rules for admission webhooks.&lt;/p&gt;

&lt;p&gt;However, with GKE Autopilot, the Kubernetes control plane is fully managed by Google, and the control-plane IP range is not exposed to the customer in the same way.&lt;/p&gt;

&lt;p&gt;This raised an important question:&lt;/p&gt;

&lt;p&gt;How should NetworkPolicies and firewall rules be configured when the Kubernetes API server's IP range is not available to the customer?&lt;/p&gt;
&lt;h2&gt;
  
  
  Investigation and Troubleshooting
&lt;/h2&gt;

&lt;p&gt;We first verified the webhook, Service, DNS, and Pod-to-Pod connectivity. Everything was working as expected.&lt;/p&gt;

&lt;p&gt;We then tried:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Changing the webhook port from 9443 to 443&lt;/li&gt;
&lt;li&gt;Increasing the webhook timeout from 10 to 30 seconds&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reviewing and updating firewall rules&lt;br&gt;
None of these resolved the timeout.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Temporarily setting failurePolicy: Ignore &lt;br&gt;
This resolved the issue, but this is not a production solution.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This led us to investigate the Kubernetes NetworkPolicy, which ultimately revealed the root cause.&lt;/p&gt;
&lt;h2&gt;
  
  
  Working With Google Cloud Support
&lt;/h2&gt;

&lt;p&gt;After exhausting the common troubleshooting approaches, we worked with the Google Cloud Support networking team to understand why the Kubernetes API server could not reach the admission webhook.&lt;/p&gt;

&lt;p&gt;Together, we performed several tests:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verified that the webhook Pod was healthy&lt;/li&gt;
&lt;li&gt;Confirmed that the Service and DNS were functioning correctly&lt;/li&gt;
&lt;li&gt;Performed packet-level connectivity testing&lt;/li&gt;
&lt;li&gt;Tested multiple firewall configurations&lt;/li&gt;
&lt;li&gt;Verified that the webhook was reachable from application Pods&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Despite these checks, the Kubernetes API server continued to experience timeout errors.&lt;/p&gt;

&lt;p&gt;During the investigation, the networking team suggested shifting our focus from VPC firewall rules to &lt;strong&gt;Kubernetes NetworkPolicy.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That turned out to be the key.&lt;/p&gt;
&lt;h2&gt;
  
  
  The NetworkPolicy Problem
&lt;/h2&gt;

&lt;p&gt;Our existing NetworkPolicy contained restrictive &lt;code&gt;from&lt;/code&gt; and &lt;code&gt;to&lt;/code&gt; rules.&lt;/p&gt;

&lt;p&gt;These rules explicitly define where traffic is allowed to originate from and where it is allowed to go.&lt;/p&gt;

&lt;p&gt;On GKE Autopilot, the Kubernetes API server resides in a &lt;strong&gt;Google-managed control plane&lt;/strong&gt;, outside the customer-visible network environment.&lt;/p&gt;

&lt;p&gt;Because these control-plane addresses are not directly exposed to customer projects, it may not be possible to explicitly reference them in NetworkPolicy rules.&lt;/p&gt;

&lt;p&gt;The networking team therefore recommended simplifying the NetworkPolicy by removing restrictive traffic selectors for the webhook communication and allowing the required traffic based primarily on the webhook port.&lt;/p&gt;

&lt;p&gt;After removing the restrictive from and to clauses while continuing to allow the required webhook port, the Kubernetes API server was immediately able to communicate with the CloudNativePG admission webhook.&lt;/p&gt;

&lt;p&gt;The PostgreSQL deployment then completed successfully.&lt;/p&gt;

&lt;p&gt;Most importantly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We did not modify the webhook implementation&lt;/li&gt;
&lt;li&gt;We did not disable admission validation&lt;/li&gt;
&lt;li&gt;We did not need to increase the webhook timeout&lt;/li&gt;
&lt;li&gt;The PostgreSQL deployment completed successfully&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This demonstrated that the issue was not caused by CloudNativePG itself.&lt;/p&gt;
&lt;h2&gt;
  
  
  Root Cause
&lt;/h2&gt;

&lt;p&gt;The root cause was restrictive NetworkPolicy rules preventing the Kubernetes API server from reaching the admission webhook.&lt;/p&gt;

&lt;p&gt;The important factor was the interaction between the NetworkPolicy and the Google-managed GKE Autopilot control plane.&lt;/p&gt;

&lt;p&gt;Because the control plane exists outside the customer-visible network, NetworkPolicies that explicitly restrict traffic sources or destinations can unintentionally block admission webhook communication.&lt;/p&gt;
&lt;h2&gt;
  
  
  Production Solution
&lt;/h2&gt;

&lt;p&gt;We resolved the issue by updating the Kubernetes NetworkPolicy.&lt;/p&gt;

&lt;p&gt;Instead of restricting webhook traffic based on specific source or destination selectors, the policy was simplified to allow the required webhook communication while retaining the necessary namespace and DNS access.&lt;/p&gt;

&lt;p&gt;After applying the updated policy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Kubernetes API server successfully reached the admission webhook&lt;/li&gt;
&lt;li&gt;PostgreSQL deployment completed successfully&lt;/li&gt;
&lt;li&gt;Admission validation remained enabled&lt;/li&gt;
&lt;li&gt;No webhook configuration changes were required&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Example NetworkPolicy
&lt;/h2&gt;

&lt;p&gt;The following NetworkPolicy represents the configuration that resolved the webhook timeout in our GKE Autopilot environment.&lt;/p&gt;

&lt;p&gt;It is provided as a reference implementation to demonstrate the important changes.&lt;/p&gt;

&lt;p&gt;Important: Do not copy this policy directly into production without reviewing it. NetworkPolicy requirements vary by application and organization. Adapt the policy according to your security and networking requirements.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;networking.k8s.io/v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;NetworkPolicy&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unified-policy&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${NAMESPACE}&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;podSelector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{}&lt;/span&gt;
  &lt;span class="na"&gt;policyTypes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;Ingress&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;Egress&lt;/span&gt;
  &lt;span class="na"&gt;ingress&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# Allow traffic within the namespace&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;namespaceSelector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;matchLabels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;kubernetes.io/metadata.name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${NAMESPACE}&lt;/span&gt;
    &lt;span class="c1"&gt;# Allow Pod-to-Pod communication&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;podSelector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{}&lt;/span&gt;
    &lt;span class="c1"&gt;# Allow admission webhook traffic on TCP 9443&lt;/span&gt;
    &lt;span class="c1"&gt;# Notice that there is no restrictive 'from'&lt;/span&gt;
    &lt;span class="c1"&gt;# selector for this rule.&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;protocol&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;TCP&lt;/span&gt;
          &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;9443&lt;/span&gt;
  &lt;span class="na"&gt;egress&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# Allow communication within the namespace&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;namespaceSelector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;matchLabels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
              &lt;span class="na"&gt;kubernetes.io/metadata.name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${NAMESPACE}&lt;/span&gt;
    &lt;span class="c1"&gt;# Allow Pod-to-Pod communication&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;podSelector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{}&lt;/span&gt;
    &lt;span class="c1"&gt;# Allow DNS resolution&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;namespaceSelector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;{}&lt;/span&gt;
      &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;protocol&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;TCP&lt;/span&gt;
          &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;53&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;protocol&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;UDP&lt;/span&gt;
          &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;53&lt;/span&gt;
    &lt;span class="c1"&gt;# Allow webhook traffic on TCP 9443&lt;/span&gt;
    &lt;span class="c1"&gt;# Notice that there is no restrictive 'to'&lt;/span&gt;
    &lt;span class="c1"&gt;# selector for this rule.&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;protocol&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;TCP&lt;/span&gt;
          &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;9443&lt;/span&gt;
   &lt;span class="c1"&gt;# Allow outbound communication required by the application&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;ipBlock&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;cidr&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;0.0.0.0/0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The key point is not the exact policy shown above.&lt;/p&gt;

&lt;p&gt;The important takeaway is:&lt;/p&gt;

&lt;p&gt;Make sure your NetworkPolicies do not unintentionally block communication between the Kubernetes API server and admission webhooks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Admission webhook timeout errors on GKE Autopilot can be challenging to diagnose because the webhook itself may appear completely healthy and reachable from within the cluster.&lt;/p&gt;

&lt;p&gt;In our case, the issue was not related to CloudNativePG or PostgreSQL. The root cause was the interaction between a restrictive Kubernetes NetworkPolicy and communication from the GKE Autopilot control plane to the admission webhook.&lt;/p&gt;

&lt;p&gt;Once the restrictive traffic selectors were removed for the required webhook communication, the API server was able to reach the webhook and the PostgreSQL deployment completed successfully.&lt;/p&gt;

&lt;p&gt;Although this article uses CloudNativePG as the example, the same troubleshooting approach can be applied to other Kubernetes operators and applications that rely on admission webhooks.&lt;/p&gt;

&lt;p&gt;If you encounter a situation where:&lt;/p&gt;

&lt;p&gt;Webhook Pod is healthy&lt;br&gt;
        ↓&lt;br&gt;
Service is healthy&lt;br&gt;
        ↓&lt;br&gt;
DNS works&lt;br&gt;
        ↓&lt;br&gt;
Pod-to-Pod connectivity works&lt;br&gt;
        ↓&lt;br&gt;
API server → webhook = timeout&lt;/p&gt;

&lt;p&gt;Check your NetworkPolicies.&lt;/p&gt;

&lt;p&gt;That simple check can save hours of troubleshooting.&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>database</category>
      <category>infrastructure</category>
      <category>kubernetes</category>
    </item>
  </channel>
</rss>
