<?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: Sedat SALMAN</title>
    <description>The latest articles on DEV Community by Sedat SALMAN (@sdtslmn).</description>
    <link>https://dev.to/sdtslmn</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%2F869117%2Fa462c21b-629f-4b45-95c7-3a51891b5c70.jpeg</url>
      <title>DEV Community: Sedat SALMAN</title>
      <link>https://dev.to/sdtslmn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sdtslmn"/>
    <language>en</language>
    <item>
      <title>Azure VM Can't Connect? 9 Causes (NSGs and Routes) and How to Find Yours</title>
      <dc:creator>Sedat SALMAN</dc:creator>
      <pubDate>Thu, 03 Dec 2026 13:00:00 +0000</pubDate>
      <link>https://dev.to/sdtslmn/azure-vm-cant-connect-9-causes-nsgs-and-routes-and-how-to-find-yours-633</link>
      <guid>https://dev.to/sdtslmn/azure-vm-cant-connect-9-causes-nsgs-and-routes-and-how-to-find-yours-633</guid>
      <description>&lt;p&gt;&lt;em&gt;Prefer video? The full walkthrough is at the top of this post, and the most common cases have one-minute Shorts right where they come up. This guide first went out on the &lt;a href="https://azurecloudinaminute.substack.com/subscribe" rel="noopener noreferrer"&gt;Azure Cloud in a Minute newsletter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The one-minute answer
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The problem:&lt;/strong&gt; a VM can’t reach something, or nothing can reach the VM. The app is fine, the port is open on the server, and the connection still times out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Azure decides:&lt;/strong&gt; two things in the network sit between the VM and the other side. Network security groups (NSGs) decide whether a flow is allowed, and there can be one on the subnet and another on the network interface. Routes decide where the packet goes next, and one user-defined route can send it to a firewall that drops it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where to look first:&lt;/strong&gt; don’t read rules by eye. Network Watcher has two checks that answer the question directly: IP flow verify names the exact NSG rule that allows or denies a flow, and next hop shows where Azure sends the packet. Run both before you change anything.&lt;/p&gt;

&lt;p&gt;The rest of this guide explains how Azure applies NSGs and routes, goes through the causes in the order worth checking, and ends with a checklist.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Azure decides
&lt;/h2&gt;

&lt;p&gt;A flow has to pass the security rules and then find a route. Here is how each part works.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NSGs: two layers, in a fixed order.&lt;/strong&gt; An NSG can sit on the subnet, on the VM’s network interface, or both. When both exist, both have to allow the flow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Inbound:&lt;/strong&gt; the subnet NSG first, then the NIC NSG.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outbound:&lt;/strong&gt; the NIC NSG first, then the subnet NSG.&lt;/li&gt;
&lt;li&gt;Traffic between two VMs in the same subnet goes through the same checks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Inside one NSG, the lowest number wins.&lt;/strong&gt; Rules have a priority from 100 to 4096. Azure reads them from the lowest number up and stops at the first rule that matches. Every NSG also has default rules you can’t remove, only override with a lower number:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inbound: AllowVnetInBound (65000), AllowAzureLoadBalancerInBound (65001), DenyAllInBound (65500).&lt;/li&gt;
&lt;li&gt;Outbound: AllowVnetOutBound (65000), AllowInternetOutBound (65001), DenyAllOutBound (65500).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;NSGs are stateful.&lt;/strong&gt; If a flow is allowed in one direction, the reply is allowed back automatically. You only write rules for the side that starts the connection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Admin rules come first.&lt;/strong&gt; If your organization uses Azure Virtual Network Manager, its security admin rules are evaluated before any NSG. A Deny there stops the traffic, an Always Allow skips the NSGs entirely, and a plain Allow passes the flow on to the NSGs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Routes: the most specific prefix wins.&lt;/strong&gt; For each packet, Azure picks the route with the longest matching prefix. When two routes have the same prefix, a user-defined route (UDR) beats a BGP route, and a BGP route beats a system route. The next hop can be the virtual network, the internet, a virtual network gateway, a virtual appliance such as a firewall, or None, which drops the packet. One exception: system routes for the virtual network, peerings and service endpoints win over BGP routes even when the BGP route is more specific, and a route table can’t override a service endpoint route.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7qy5hku03960xxqpmfe2.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7qy5hku03960xxqpmfe2.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with two checks
&lt;/h2&gt;

&lt;p&gt;Both are in Network Watcher, and both answer in seconds. The VM has to be running, and Network Watcher has to be enabled in its region, which Azure does automatically when you create a virtual network there.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. IP flow verify: is the flow allowed?&lt;/strong&gt; Give it the direction, protocol, the VM’s IP and port, and the other side’s IP and port. It checks every NSG on the VM’s subnet and NIC, plus any Virtual Network Manager admin rules, and returns Allow or Deny with the name of the rule that decided it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;az network watcher test-ip-flow --vm myVM --resource-group myRG \
  --direction Inbound --protocol TCP \
  --local 10.0.0.4:443 --remote 203.0.113.10:60000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Access  RuleName
------  ------------------------------------
Deny    defaultSecurityRules/DenyAllInBound
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It tests TCP and UDP only. For ICMP, such as ping, use NSG diagnostics instead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Next hop: where does the packet go?&lt;/strong&gt; Give it the VM’s IP and the destination IP. It returns the next hop type, the next hop IP, and the route table that holds the route, or System Route if no UDR applies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;az network watcher show-next-hop --vm myVM --resource-group myRG \
  --source-ip 10.0.0.4 --dest-ip 10.20.1.5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If IP flow verify says Allow and next hop points where you expect, this VM’s own rules and first hop are fine. Both tools only look at this VM, so check the rest next: the NSGs at the other end (run IP flow verify on that VM too), the device at the next hop, the return path, and the VM itself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcxio931dcpvaypp8mp80.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcxio931dcpvaypp8mp80.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The causes, one by one
&lt;/h2&gt;

&lt;p&gt;Check them in this order. The first four are security rules, which IP flow verify catches. The next three are routes, which next hop catches. The last two are outside both checks.&lt;/p&gt;

&lt;h3&gt;
  
  
  A rule says no
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. A Deny rule with a lower number.&lt;/strong&gt; You added an Allow for port 443 at priority 300, but a broader Deny at priority 200 matches first, and processing stops there. This often comes from a “deny all from the internet” rule someone added for safety.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; give your Allow a lower number than the Deny, or narrow the Deny. IP flow verify names the rule that matched.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/E-PV-NrbmvE" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The other NSG says no.&lt;/strong&gt; You fixed the NIC NSG, but the subnet NSG still denies the flow, or the other way round. For inbound traffic the subnet NSG is checked first, so a deny there means the NIC NSG never gets a say.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; check both layers. Microsoft recommends using one or the other, not both, because rules at two levels can conflict.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/dX1H7qKdgu0" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Nothing allows it.&lt;/strong&gt; Without a matching Allow, the default DenyAllInBound rule blocks the flow. AllowVnetInBound uses the VirtualNetwork tag: your address space, peered and on-premises networks, and prefixes used in your UDRs. It isn’t meant for internet clients, which need an Allow of their own. Microsoft notes the tag might also contain default routes, so after adding a 0.0.0.0/0 UDR, check what it covers in the effective security rules. A VM with a Standard public IP is secure by default: traffic from the internet needs an NSG with an explicit Allow.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; add an Allow for the exact source, port and protocol. Keep the source as narrow as you can, such as your office IP rather than Any.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. A Virtual Network Manager admin rule.&lt;/strong&gt; If your organization manages networks centrally, a security admin rule is evaluated before your NSGs. Its Deny wins, whatever your NSG says.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; IP flow verify names admin rules too. No NSG rule can override an admin Deny, so whoever owns the Virtual Network Manager configuration has to change it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffbidxio7ny4bgrz5nw2d.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffbidxio7ny4bgrz5nw2d.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The packet goes the wrong way
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;5. A route sends it to a firewall that drops it.&lt;/strong&gt; A UDR with 0.0.0.0/0 or a broad private range points at Azure Firewall or another appliance. Next hop shows VirtualAppliance and the route table. The NSGs allow the flow, and the firewall has no rule for it. A third-party appliance also needs IP forwarding turned on for its NIC, or it can’t forward traffic that isn’t addressed to it.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; add the rule on the firewall, or send that destination a different way with a more specific route.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Replies come back a different way.&lt;/strong&gt; Traffic arrives on the VM’s public IP or a public load balancer, but a 0.0.0.0/0 route sends the reply through the firewall. The firewall is stateful, never saw the request, and drops the reply.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; make both directions take the same path. Bring the traffic in through the firewall with a DNAT rule, instead of a public IP on the VM. For a public load balancer behind a firewall, Microsoft’s guide also adds a route for the firewall’s public IP with next hop Internet, and notes that an internal load balancer behind the firewall avoids the problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. There’s no route, or the next hop is None.&lt;/strong&gt; Next hop None means Azure drops the packet. Traffic to on-premises also fails if the route table on the subnet has gateway route propagation disabled, because the routes learned from the VPN or ExpressRoute gateway don’t reach that subnet.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; compare the VM’s effective routes with where the traffic should go, and turn propagation back on or add the missing route. A UDR with next hop Virtual network gateway works only with a VPN gateway.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi6esvfo3iq7q227h095c.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi6esvfo3iq7q227h095c.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Outside the network checks
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;8. The subnet has no way out to the internet.&lt;/strong&gt; New virtual networks now use private subnets by default: the portal already does, and so does the API version released after March 31, 2026. A VM there gets no default outbound IP, so internet calls, Windows activation and Windows Update fail even though every NSG allows them, and IP flow verify still says Allow. Existing virtual networks aren’t changed, and templates pinned to older API versions keep the old behaviour. In a private subnet, a UDR with next hop Internet also stops working.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; add an explicit way out. Microsoft recommends a NAT gateway for most cases. A Standard public IP, a load balancer with outbound rules, or a firewall with a UDR also work. Email on port 25 is a separate case: Azure blocks outbound port 25 for pay-as-you-go subscriptions, among others, so send through an authenticated SMTP relay, usually on port 587.&lt;/p&gt;

&lt;p&gt;This one changed recently and catches a lot of new VMs, so here it is in under a minute:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/iDmt1SsjtzQ" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9. The VM itself.&lt;/strong&gt; If NSGs and routes are fine, look inside the VM: the operating system firewall, a service that isn’t running, or one that only listens on 127.0.0.1.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; from the VM, check the service is listening on the right address and port, and check the OS firewall rules.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2dq8f18vhqy3n5wvaa94.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2dq8f18vhqy3n5wvaa94.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to check it
&lt;/h2&gt;

&lt;p&gt;Run these with the VM running, for the exact IPs and port of the failing connection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Test the flow.&lt;/strong&gt; IP flow verify, as above. Note the rule name it returns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. See every rule that applies.&lt;/strong&gt; Effective security rules combine the subnet NSG and the NIC NSG in one list. In the portal: the VM → Networking → Network settings → the network interface → Help → Effective security rules. The portal shows the first 50 rules; Download gives you all of them. Nothing shows if no NSG is attached to the NIC or its subnet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;az network nic list-effective-nsg --name myVM-nic --resource-group myRG
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. See every route that applies.&lt;/strong&gt; Effective routes show the system routes, your UDRs and the gateway routes for that NIC, and which ones are active. In the portal they sit next to the effective security rules, under Help.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;az network nic show-effective-route-table --name myVM-nic --resource-group myRG
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Find the next hop.&lt;/strong&gt; Next hop, as above. VirtualAppliance means a firewall or appliance decides next, so check its rules and logs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Check the subnet’s way out.&lt;/strong&gt; For internet traffic, look at the subnet’s Default outbound access setting and whether it has a NAT gateway.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Test again with a new connection.&lt;/strong&gt; NSG rules only affect new connections. When you remove a rule that allowed a connection, a session that was already open stays up. It works the other way too: a new Deny doesn’t drop a session that’s already open. So retest with a fresh connection, not a window you already had open.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;The VM is running, and you test with the exact IPs, port and protocol of the failing connection.&lt;/li&gt;
&lt;li&gt;IP flow verify says Allow, in the direction the connection starts.&lt;/li&gt;
&lt;li&gt;No lower-numbered Deny matches, in the subnet NSG or the NIC NSG.&lt;/li&gt;
&lt;li&gt;Both NSG layers allow the flow, if both exist.&lt;/li&gt;
&lt;li&gt;Traffic from the internet has an explicit Allow for a narrow source.&lt;/li&gt;
&lt;li&gt;No Virtual Network Manager admin rule denies it.&lt;/li&gt;
&lt;li&gt;Next hop points where you expect, and any firewall at that hop allows the flow.&lt;/li&gt;
&lt;li&gt;Replies take the same path as requests.&lt;/li&gt;
&lt;li&gt;Routes to on-premises are in the effective routes, with gateway route propagation on where needed.&lt;/li&gt;
&lt;li&gt;For internet access, the subnet has an explicit way out, such as a NAT gateway.&lt;/li&gt;
&lt;li&gt;Inside the VM, the service is listening on the right address and the OS firewall allows the port.&lt;/li&gt;
&lt;li&gt;You retested with a new connection.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  From the field
&lt;/h2&gt;

&lt;p&gt;Most of my Azure networking work has been multi-site: plants and offices joined into hub-and-spoke networks, with a firewall in the hub. When a VM couldn’t connect, everyone opened the NSG first. The cases that took longest were rarely there. They were a 0.0.0.0/0 route sending replies through the firewall, or a new subnet the firewall had no rule for. So now I run IP flow verify and next hop for the exact flow before I change anything. Those two answers usually tell me which team to call: the network team, the firewall owner, or the server team.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep going
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Related guides:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/sdtslmn/azure-private-endpoint-not-working-8-causes-and-most-are-dns-4f29"&gt;Azure private endpoint not working? 8 causes, and most are DNS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/sdtslmn/azure-deployment-failed-12-error-codes-and-how-to-fix-each-one-27ob"&gt;Azure deployment failed? 12 error codes and how to fix each one&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://azurecloudinaminute.substack.com/p/azure-in-60-seconds-landing-zones" rel="noopener noreferrer"&gt;Landing zones when the workload can't touch the internet&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Shorts from this guide:&lt;/strong&gt; &lt;a href="https://www.youtube.com/shorts/E-PV-NrbmvE" rel="noopener noreferrer"&gt;NSG allow rule ignored&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/dX1H7qKdgu0" rel="noopener noreferrer"&gt;NSG allows 443, traffic still blocked&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/iDmt1SsjtzQ" rel="noopener noreferrer"&gt;new VM has no internet&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get the next one:&lt;/strong&gt; new guides go out first on the &lt;a href="https://azurecloudinaminute.substack.com/subscribe" rel="noopener noreferrer"&gt;Azure Cloud in a Minute newsletter&lt;/a&gt;, with a long video and Shorts on &lt;a href="https://www.youtube.com/@AzureCloudInAMinute?sub_confirmation=1" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;. I also run &lt;a href="https://www.youtube.com/@AWSCloudInAMinute" rel="noopener noreferrer"&gt;AWS Cloud in a Minute&lt;/a&gt; and &lt;a href="https://www.youtube.com/@KubernetesInaMinute" rel="noopener noreferrer"&gt;Kubernetes in a Minute&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;p&gt;All from Microsoft Learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/virtual-network/network-security-group-how-it-works" rel="noopener noreferrer"&gt;How network security groups filter network traffic&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/virtual-network/network-security-groups-overview" rel="noopener noreferrer"&gt;Network security groups overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/virtual-network/service-tags-overview" rel="noopener noreferrer"&gt;Virtual network service tags&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/virtual-network-manager/concept-security-admins" rel="noopener noreferrer"&gt;Security admin rules in Azure Virtual Network Manager&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-udr-overview" rel="noopener noreferrer"&gt;Virtual network traffic routing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/virtual-network/manage-route-table" rel="noopener noreferrer"&gt;Create, change, or delete a route table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/network-watcher/ip-flow-verify-overview" rel="noopener noreferrer"&gt;IP flow verify overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/network-watcher/next-hop-overview" rel="noopener noreferrer"&gt;Next hop overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/virtual-network/diagnose-network-traffic-filter-problem" rel="noopener noreferrer"&gt;Diagnose a virtual machine network traffic filter problem&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/network-watcher/diagnose-vm-network-routing-problem-cli" rel="noopener noreferrer"&gt;Diagnose a virtual machine network routing problem (Azure CLI)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/firewall/integrate-lb" rel="noopener noreferrer"&gt;Integrate Azure Firewall with Azure Standard Load Balancer (asymmetric routing)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/default-outbound-access" rel="noopener noreferrer"&gt;Default outbound access in Azure&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Independent writer, not affiliated with or endorsed by Microsoft.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>azure</category>
      <category>networking</category>
      <category>security</category>
      <category>cloud</category>
    </item>
    <item>
      <title>NAT Gateway vs VPC Endpoints: Can't Reach S3, or NAT Bill Too High? 12 Causes</title>
      <dc:creator>Sedat SALMAN</dc:creator>
      <pubDate>Wed, 02 Dec 2026 13:00:00 +0000</pubDate>
      <link>https://dev.to/aws-builders/nat-gateway-vs-vpc-endpoints-cant-reach-s3-or-nat-bill-too-high-12-causes-3njd</link>
      <guid>https://dev.to/aws-builders/nat-gateway-vs-vpc-endpoints-cant-reach-s3-or-nat-bill-too-high-12-causes-3njd</guid>
      <description>&lt;p&gt;&lt;em&gt;Prefer video? The full walkthrough is at the top of this post, and the most common cases have one-minute Shorts right where they come up. This guide first went out on the &lt;a href="https://awscloudinaminute.substack.com/subscribe" rel="noopener noreferrer"&gt;AWS Cloud in a Minute newsletter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The one-minute answer
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The problem:&lt;/strong&gt; an instance, container or Lambda function in a private subnet can’t reach S3 or another AWS service. Or it can, and the NAT gateway line on your bill keeps growing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How AWS decides:&lt;/strong&gt; a private subnet has no direct route to the internet. Traffic to AWS services leaves it one of three ways: through a NAT gateway, which is charged per hour and per GB; through a gateway endpoint, which works only for S3 and DynamoDB and is free; or through an interface endpoint, which works for most other services and is charged per hour in each Availability Zone and per GB. The subnet’s route table and DNS decide which way each request goes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where to look first:&lt;/strong&gt; the route table of the subnet the workload runs in. If there’s no route to a gateway endpoint for S3, S3 traffic goes to the NAT gateway and you pay for every GB, or, with no NAT gateway, it goes nowhere.&lt;/p&gt;

&lt;p&gt;The rest of this guide explains the three paths and what each costs, goes through the causes in the order worth checking, and ends with a checklist.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three ways out of a private subnet
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkd86257l59sofxmmzme2.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkd86257l59sofxmmzme2.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NAT gateway.&lt;/strong&gt; A route for &lt;code&gt;0.0.0.0/0&lt;/code&gt; points at the NAT gateway, and the NAT gateway sends traffic on to the internet, including to public AWS service endpoints. You pay for each hour it exists, used or not, and for each GB it processes. In US East (Ohio), for example, that’s $0.045 per hour and $0.045 per GB. Traffic to S3 in the same Region has no data transfer charge, but the NAT gateway still charges for processing it.&lt;/p&gt;

&lt;p&gt;A classic NAT gateway lives in one Availability Zone, in a public subnet with a route to an internet gateway. AWS recommends one per zone, because sending traffic to a NAT gateway in another zone adds cross-zone data charges and ties every zone to that one. Since November 2025 there’s also a regional NAT gateway: one gateway that expands across the zones where you have workloads and doesn’t need a public subnet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gateway endpoint.&lt;/strong&gt; Only for S3 and DynamoDB, and there’s no charge for it. It doesn’t create anything in your subnets. It adds a route to the route tables you associate with it: the destination is the service’s prefix list, such as &lt;code&gt;pl-63a5400a&lt;/code&gt; for S3 in us-east-1, and the target is the endpoint. Routing uses the longest prefix match, so this route wins over &lt;code&gt;0.0.0.0/0&lt;/code&gt; for that service. Three limits matter:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9cszlizc6hrayaxr05r8.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9cszlizc6hrayaxr05r8.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It covers only buckets and tables in the same Region as the endpoint.&lt;/li&gt;
&lt;li&gt;It can’t be used from the other side of a VPN, Direct Connect, VPC peering or transit gateway connection.&lt;/li&gt;
&lt;li&gt;Only subnets whose route table is associated with it use it. Every other subnet keeps going through the NAT gateway.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Interface endpoint (AWS PrivateLink).&lt;/strong&gt; For most AWS services, such as STS, SQS, Secrets Manager, ECR and CloudWatch Logs, and also for S3 when you need it from on-premises or another VPC. It puts a network interface with a private IP in each subnet you choose, one per zone, behind a security group. With private DNS on, the service’s normal name resolves to those private IPs, so your code doesn’t change. It costs $0.01 per hour for each network interface and $0.01 per GB for the first petabyte, using the US East (N. Virginia) rates.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0i9eiaix50it8l7kqndl.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0i9eiaix50it8l7kqndl.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which one to use:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;S3 or DynamoDB in the same Region: a gateway endpoint. It’s free.&lt;/li&gt;
&lt;li&gt;S3 from on-premises or another VPC: an interface endpoint for S3.&lt;/li&gt;
&lt;li&gt;Another AWS service with a lot of traffic: an interface endpoint, at $0.01 per GB instead of the NAT gateway’s $0.045.&lt;/li&gt;
&lt;li&gt;Anything outside AWS, such as package repositories or third-party APIs: the NAT gateway.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A quick sum shows the difference. One terabyte a month from a private subnet to S3 costs about $45 in NAT gateway processing alone, and nothing through a gateway endpoint. An interface endpoint in three zones costs about $22 a month for the hours (3 × 730 × $0.01), plus its per-GB charge, so for a service with little traffic, the NAT gateway you already pay for can be cheaper.&lt;/p&gt;

&lt;h2&gt;
  
  
  The causes, one by one
&lt;/h2&gt;

&lt;p&gt;Check them in this order. The first five are about S3 and DynamoDB, the next two about interface endpoints, then the NAT gateway itself, and the last three are about cost.&lt;/p&gt;

&lt;h3&gt;
  
  
  It can’t reach S3 or DynamoDB
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3e1ksw9hnceoz93l4x3u.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3e1ksw9hnceoz93l4x3u.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The gateway endpoint isn’t on this subnet’s route table.&lt;/strong&gt; A gateway endpoint is associated with route tables, not subnets. If the workload’s subnet uses a different route table, S3 traffic goes to the NAT gateway, or nowhere. A subnet without its own route table uses the VPC’s main route table, which is easy to miss.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; associate the subnet’s route table with the endpoint. Look for a route whose destination starts with &lt;code&gt;pl-&lt;/code&gt; and whose target starts with &lt;code&gt;vpce-&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The classic case is a Lambda function in a VPC, in under a minute:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/oi_53neNfIk" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The bucket is in another Region.&lt;/strong&gt; Prefix lists are per Region, so a gateway endpoint in us-east-1 does nothing for a bucket in eu-west-1. That traffic goes to the NAT gateway, and in a subnet without one, it fails. It also happens when the SDK or CLI is set to the wrong Region.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; set the Region your code uses to the bucket’s Region, keep data and workloads in the same Region, or accept the NAT path for that traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The endpoint policy blocks it.&lt;/strong&gt; The default endpoint policy allows full access. Once someone narrows it to a list of buckets, every other bucket is blocked through that endpoint, including ones you forgot you depend on.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; read the endpoint policy and add the bucket you need.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. The bucket policy blocks it.&lt;/strong&gt; Requests through an endpoint reach S3 from your VPC’s private IP addresses, not your NAT gateway’s public IP. A bucket policy that allows access with &lt;code&gt;aws:SourceIp&lt;/code&gt;, such as your NAT gateway’s Elastic IP, stops matching, because that key isn’t available for requests that come through a VPC endpoint.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; use &lt;code&gt;aws:SourceVpce&lt;/code&gt; with the endpoint ID, or &lt;code&gt;aws:SourceVpc&lt;/code&gt; with the VPC ID. Be careful with Deny statements that use them: a Deny for everything not coming from your endpoint also blocks the console, and can lock you out of the bucket.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/ieAw5YR1oTA" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. A security group or network ACL blocks it.&lt;/strong&gt; If outbound rules are restricted, the instance’s security group needs to allow port 443 to the S3 prefix list. Network ACLs can’t reference prefix lists, so they need the service’s IP ranges instead.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; allow outbound 443 to the prefix list in the security group, and to the service’s CIDR blocks in the network ACL.&lt;/p&gt;

&lt;h3&gt;
  
  
  It can’t reach other AWS services
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyha1mwt7yiq1nxrs2a8n.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyha1mwt7yiq1nxrs2a8n.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. The name still resolves to a public IP.&lt;/strong&gt; For an interface endpoint to be used, the service’s name has to resolve to the endpoint’s private IPs. That needs private DNS enabled on the endpoint, and DNS resolution and DNS hostnames enabled on the VPC. Otherwise the request goes to the public endpoint through the NAT gateway, or fails without one.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; enable private DNS on the endpoint and both DNS settings on the VPC, then check that the name returns private addresses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. The endpoint’s security group doesn’t allow your clients.&lt;/strong&gt; The interface endpoint has its own security group, and it has to allow inbound HTTPS from the subnets or security groups that call the service.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; allow inbound 443 on the endpoint’s security group from your workloads.&lt;/p&gt;

&lt;h3&gt;
  
  
  It can’t reach the internet
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F88bt5ukvus9qixxw1xwb.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F88bt5ukvus9qixxw1xwb.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. The NAT gateway path is incomplete.&lt;/strong&gt; A classic public NAT gateway must be in the Available state, sit in a public subnet whose route table sends internet traffic to an internet gateway, and the private subnet’s route table must send &lt;code&gt;0.0.0.0/0&lt;/code&gt; to the NAT gateway. Security groups and network ACLs on both subnets have to allow the traffic. A private NAT gateway can’t reach the internet at all.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; check each link in that chain. VPC Flow Logs show where packets are dropped.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9. Long idle connections drop.&lt;/strong&gt; A NAT gateway closes a connection after 350 seconds without traffic and sends a reset. Database connections and long polls fail at random.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; turn on TCP keepalive with an interval under 350 seconds, or keep the connection busy.&lt;/p&gt;

&lt;h3&gt;
  
  
  It works, but costs too much
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxp60l3zkvhlypwjmv129.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxp60l3zkvhlypwjmv129.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10. S3 or DynamoDB traffic goes through the NAT gateway.&lt;/strong&gt; Without a gateway endpoint, every GB to S3 or DynamoDB pays the NAT processing charge, even inside one Region. This is the most common NAT gateway surprise.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; add a gateway endpoint for S3 (and DynamoDB, if you use it) and associate it with every private route table.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/6x3pIW47hUw" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11. One NAT gateway serves every zone.&lt;/strong&gt; Workloads in other zones send their traffic across zones to reach it, which adds cross-zone data charges, and if that zone has a problem, every zone loses its way out.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; put a NAT gateway in each zone with workloads, with each zone’s private route table pointing at its own, or use a regional NAT gateway.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/i6QvuqxaEXk" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;12. Chatty AWS API traffic goes through the NAT gateway.&lt;/strong&gt; Pulling container images, shipping logs and calling a cluster’s public API endpoint all count as NAT traffic.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; add interface endpoints for the busiest services, such as ECR and CloudWatch Logs, and use private endpoints where a service offers them, such as the EKS cluster endpoint.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to check it
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcrbc79qlzvlncp9dlbek.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcrbc79qlzvlncp9dlbek.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Read the subnet’s route table.&lt;/strong&gt; Look for the &lt;code&gt;pl-&lt;/code&gt; route to a &lt;code&gt;vpce-&lt;/code&gt; target, and the &lt;code&gt;0.0.0.0/0&lt;/code&gt; route to the NAT gateway. If this returns nothing, the subnet uses the main route table.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws ec2 describe-route-tables \
  --filters Name=association.subnet-id,Values=subnet-0abc1234
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. List the VPC’s endpoints and their policies.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws ec2 describe-vpc-endpoints \
  --filters Name=vpc-id,Values=vpc-0abc1234
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Check DNS from the workload.&lt;/strong&gt; For a service with an interface endpoint, the name should return private addresses from your VPC.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nslookup sqs.us-east-1.amazonaws.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Find out what goes through the NAT gateway.&lt;/strong&gt; CloudWatch has metrics for each NAT gateway, such as &lt;code&gt;BytesOutToDestination&lt;/code&gt;. For the destinations, turn on VPC Flow Logs for the NAT gateway’s network interface and query them with Athena.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Find it on the bill.&lt;/strong&gt; In Cost Explorer, group by usage type and look for &lt;code&gt;NatGateway-Bytes&lt;/code&gt;. Turn on Cost Anomaly Detection so a jump reaches you in days, not at the end of the month.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Test again with a new connection.&lt;/strong&gt; Adding a gateway endpoint changes routes and closes open TCP connections, so retry the request rather than waiting on an old one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;The workload’s subnet route table has a &lt;code&gt;pl-&lt;/code&gt; route to the S3 gateway endpoint, and DynamoDB if you use it.&lt;/li&gt;
&lt;li&gt;Buckets and tables are in the same Region as the endpoint, and your code uses that Region.&lt;/li&gt;
&lt;li&gt;The endpoint policy allows the buckets you use.&lt;/li&gt;
&lt;li&gt;Bucket policies use &lt;code&gt;aws:SourceVpce&lt;/code&gt; or &lt;code&gt;aws:SourceVpc&lt;/code&gt;, not &lt;code&gt;aws:SourceIp&lt;/code&gt;, for traffic through the endpoint.&lt;/li&gt;
&lt;li&gt;Security groups allow outbound 443 to the prefix list, and network ACLs allow the service’s ranges.&lt;/li&gt;
&lt;li&gt;Interface endpoints have private DNS on, and the VPC has DNS resolution and DNS hostnames on.&lt;/li&gt;
&lt;li&gt;The interface endpoint’s security group allows inbound 443 from your workloads.&lt;/li&gt;
&lt;li&gt;For internet access, the NAT gateway is Available, the path to the internet gateway is complete, and the private route table points &lt;code&gt;0.0.0.0/0&lt;/code&gt; at it.&lt;/li&gt;
&lt;li&gt;Long-lived connections send keepalives more often than every 350 seconds.&lt;/li&gt;
&lt;li&gt;Each zone with workloads has its own NAT gateway, or you use a regional NAT gateway.&lt;/li&gt;
&lt;li&gt;Busy AWS services have interface endpoints.&lt;/li&gt;
&lt;li&gt;Cost Anomaly Detection is on, and you know your normal &lt;code&gt;NatGateway-Bytes&lt;/code&gt; level.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  From the field
&lt;/h2&gt;

&lt;p&gt;Two teams have written publicly about finding this on their bill.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Geocodio: $907 in one day.&lt;/strong&gt; Geocodio mirrors large datasets to S3 from EC2. A few days after they deployed a new S3 sync process, AWS Cost Anomaly Detection flagged a spike: 20,167 GB through the NAT gateway in a single day, $907.53 at $0.045 per GB, and more than $1,000 for the month so far. The instances and the bucket were in the same Region, but the traffic still went through the NAT gateway, which charges for every GB it processes. The fix was a gateway endpoint for S3, associated with their route tables in Terraform, and an audit of every VPC that talks to S3. AWS refunded the charge after they explained what happened. (&lt;a href="https://new.geocod.io/code-and-coordinates/2025-11-18-the-1000-aws-mistake" rel="noopener noreferrer"&gt;Geocodio’s write-up&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ShipMonk: a monitoring chart that doubled the NAT bill.&lt;/strong&gt; At ShipMonk, the NAT gateway cost for their development environments grew to about twice its normal level. The billing tool showed only a cost and a resource ID, which led to the NAT gateway in eu-west-1, and the increase started on the day a cost-reporting Helm chart was installed. VPC Flow Logs, stored in S3 and queried with Athena, showed the traffic was going to the EKS cluster’s public API endpoint, from around 100 environments with about 100 pods each. Enabling the cluster’s private endpoint kept that traffic inside the VPC, and NAT usage went back to its old level. Their note for anyone doing the same: allow every subnet and security group that calls the cluster in the cluster security group, or the calls time out. (&lt;a href="https://pd.shipmonk.com/analyzing-unexpected-expenses-aws-nat-gateway-and-eks-public-endpoint/" rel="noopener noreferrer"&gt;ShipMonk’s write-up&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Neither team had anything misconfigured in the usual sense. The traffic took the default path, and the default path was the NAT gateway.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep going
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Related guides:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/aws-builders/s3-access-denied-with-an-iam-allow-11-causes-and-how-to-find-yours-3gc3"&gt;S3 Access Denied with an IAM Allow? 11 causes and how to find yours&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://awscloudinaminute.substack.com/p/aws-hidden-costs" rel="noopener noreferrer"&gt;AWS bill higher than expected? 12 hidden costs and how to find them&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://awscloudinaminute.substack.com/p/ec2-ssh-connection-timed-out" rel="noopener noreferrer"&gt;EC2 SSH connection timed out? 12 causes and how to find yours&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/shorts/8V8QREx0W1w" rel="noopener noreferrer"&gt;Short: AWS charges for every public IPv4 address, even idle ones&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Shorts from this guide:&lt;/strong&gt; &lt;a href="https://www.youtube.com/shorts/oi_53neNfIk" rel="noopener noreferrer"&gt;Lambda in a VPC can't reach S3&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/ieAw5YR1oTA" rel="noopener noreferrer"&gt;S3 Access Denied after adding a VPC endpoint&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/6x3pIW47hUw" rel="noopener noreferrer"&gt;send S3 traffic through a free endpoint&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/i6QvuqxaEXk" rel="noopener noreferrer"&gt;one NAT gateway for every zone&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get the next one:&lt;/strong&gt; new guides go out first on the &lt;a href="https://awscloudinaminute.substack.com/subscribe" rel="noopener noreferrer"&gt;AWS Cloud in a Minute newsletter&lt;/a&gt;, with a long video and Shorts on &lt;a href="https://www.youtube.com/@AWSCloudInAMinute?sub_confirmation=1" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;. I also run &lt;a href="https://www.youtube.com/@AzureCloudInAMinute" rel="noopener noreferrer"&gt;Azure Cloud in a Minute&lt;/a&gt; and &lt;a href="https://www.youtube.com/@KubernetesInaMinute" rel="noopener noreferrer"&gt;Kubernetes in a Minute&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;p&gt;From AWS:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/vpc/pricing/" rel="noopener noreferrer"&gt;Amazon VPC pricing (NAT gateway)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/privatelink/pricing/" rel="noopener noreferrer"&gt;AWS PrivateLink pricing (interface endpoints)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-pricing.html" rel="noopener noreferrer"&gt;NAT gateway pricing and how to reduce data processing charges&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-troubleshooting.html" rel="noopener noreferrer"&gt;Troubleshoot NAT gateways&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/about-aws/whats-new/2025/11/aws-nat-gateway-regional-availability" rel="noopener noreferrer"&gt;AWS NAT Gateway now supports regional availability&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/blogs/networking-and-content-delivery/introducing-amazon-vpc-regional-nat-gateway" rel="noopener noreferrer"&gt;Introducing Amazon VPC regional NAT gateway&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/vpc/latest/privatelink/gateway-endpoints.html" rel="noopener noreferrer"&gt;Gateway endpoints&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-s3.html" rel="noopener noreferrer"&gt;Gateway endpoints for Amazon S3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/vpc/latest/privatelink/create-interface-endpoint.html" rel="noopener noreferrer"&gt;Create an interface VPC endpoint&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies-vpc-endpoint.html" rel="noopener noreferrer"&gt;Controlling access from VPC endpoints with bucket policies&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html" rel="noopener noreferrer"&gt;AWS global condition context keys (aws:SourceIp)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Field cases from Geocodio and ShipMonk, linked above.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Independent writer, not affiliated with or endorsed by Amazon Web Services.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>networking</category>
      <category>finops</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Pod Stuck in ContainerCreating? 5 Kubernetes Config and Storage Errors Explained and Fixed</title>
      <dc:creator>Sedat SALMAN</dc:creator>
      <pubDate>Tue, 01 Dec 2026 13:00:00 +0000</pubDate>
      <link>https://dev.to/sdtslmn/pod-stuck-in-containercreating-5-kubernetes-config-and-storage-errors-explained-and-fixed-45nk</link>
      <guid>https://dev.to/sdtslmn/pod-stuck-in-containercreating-5-kubernetes-config-and-storage-errors-explained-and-fixed-45nk</guid>
      <description>&lt;p&gt;Five Pods, and none of them is running. One is Pending, one sits in ContainerCreating, one shows Init:CrashLoopBackOff, and two say CreateContainerConfigError. None of this is a bug in your code. Each of these stops the Pod before your app even starts.&lt;/p&gt;

&lt;p&gt;This post follows a Pod from the moment you create it to Running, and fixes the five config and storage problems that block it most often, with real terminal output for each. The video at the top covers the same ground in under four minutes, and each problem has a one-minute Short right where it comes up.&lt;/p&gt;

&lt;p&gt;This is part 3 of the series. Part 2 covers Pods that run but can't be reached:&lt;/p&gt;


&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/sdtslmn/pod-running-but-app-unreachable-5-kubernetes-network-problems-explained-and-fixed-2nfh" class="crayons-story__hidden-navigation-link"&gt;Pod Running but App Unreachable? 5 Kubernetes Network Problems Explained and Fixed&lt;/a&gt;
    &lt;div class="crayons-article__cover crayons-article__cover__image__feed"&gt;
      &lt;iframe src="https://www.youtube.com/embed/rKbIA7DXXq8" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" title="Pod Running but App Unreachable? 5 Kubernetes Network Problems Explained and Fixed"&gt;&lt;/iframe&gt;
    &lt;/div&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/sdtslmn" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F869117%2Fa462c21b-629f-4b45-95c7-3a51891b5c70.jpeg" alt="sdtslmn profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/sdtslmn" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Sedat SALMAN
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Sedat SALMAN
                
                
              
              &lt;div id="story-author-preview-content-5113428" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/sdtslmn" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F869117%2Fa462c21b-629f-4b45-95c7-3a51891b5c70.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Sedat SALMAN&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/sdtslmn/pod-running-but-app-unreachable-5-kubernetes-network-problems-explained-and-fixed-2nfh" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Nov 28&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/sdtslmn/pod-running-but-app-unreachable-5-kubernetes-network-problems-explained-and-fixed-2nfh" id="article-link-5113428"&gt;
          Pod Running but App Unreachable? 5 Kubernetes Network Problems Explained and Fixed
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/kubernetes"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;kubernetes&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/devops"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;devops&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/networking"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;networking&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/tutorial"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;tutorial&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
            &lt;a href="https://dev.to/sdtslmn/pod-running-but-app-unreachable-5-kubernetes-network-problems-explained-and-fixed-2nfh#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              &lt;span class="hidden s:inline"&gt;Add&amp;nbsp;Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            9 min read
          &lt;/small&gt;
          
          &lt;div class="only-sidebar-menu-item trusted-visible-block print-hidden align-center"&gt;
                
                    
                
          &lt;/div&gt;

        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;/div&gt;


&lt;h2&gt;
  
  
  Four gates before Running
&lt;/h2&gt;

&lt;p&gt;Between &lt;code&gt;kubectl apply&lt;/code&gt; and Running, a Pod has to pass four gates, in this order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;A node.&lt;/strong&gt; The scheduler picks one. If the Pod uses a PersistentVolumeClaim, that claim has to be bound first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Volumes.&lt;/strong&gt; The kubelet on that node mounts every volume the Pod asks for.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Init containers.&lt;/strong&gt; They run one at a time, and each has to succeed before the next one starts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The container environment.&lt;/strong&gt; The kubelet creates the app containers, with environment variables taken from ConfigMaps and Secrets.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The status tells you which gate stopped the Pod:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pending&lt;/strong&gt;: no node yet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ContainerCreating&lt;/strong&gt; for a long time: stuck at the volumes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Init:...&lt;/strong&gt;: stuck at an init container.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CreateContainerConfigError&lt;/strong&gt;: stuck at the environment.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The routine: status, then events
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;kubectl get pods&lt;/code&gt; gives you the status. Here are all five at once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get pods
NAME        READY   STATUS                       RESTARTS      AGE
db-client   0/1     CreateContainerConfigError   0             50s
settings    0/1     CreateContainerConfigError   0             50s
shop        0/1     Init:CrashLoopBackOff        4 (18s ago)   50s
web         0/1     ContainerCreating            0             50s
writer      0/1     Pending                      0             50s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Then read the events. &lt;code&gt;kubectl describe pod &amp;lt;name&amp;gt;&lt;/code&gt; shows them for one Pod. To see every problem in the namespace at once, filter the events by type:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get events --field-selector type=Warning
LAST SEEN   TYPE      REASON               OBJECT
50s         Warning   FailedScheduling     pod/writer
50s         Warning   FailedMount          pod/web
18s         Warning   Failed               pod/db-client
18s         Warning   BackOff              pod/shop
17s         Warning   Failed               pod/settings
5s          Warning   ProvisioningFailed   persistentvolumeclaim/data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Six warnings, five Pods. Let's take them gate by gate.&lt;/p&gt;
&lt;h2&gt;
  
  
  1. Pending: the claim isn't bound
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;writer&lt;/code&gt; is Pending, and its events explain why:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl describe pod writer | tail -1
  Warning  FailedScheduling  50s  default-scheduler  0/3 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The scheduler won't place a Pod whose claim isn't bound. So the next question is why the claim is stuck:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ kubectl get pvc data
NAME   STATUS    &lt;span class="k"&gt;VOLUME&lt;/span&gt;   CAPACITY   ACCESS MODES   STORAGECLASS
data   Pending                                      fast

$ kubectl describe pvc data &lt;span class="o"&gt;|&lt;/span&gt; tail -1
  Warning  ProvisioningFailed  5s &lt;span class="o"&gt;(&lt;/span&gt;x4 over 50s&lt;span class="o"&gt;)&lt;/span&gt;  ...  storageclass.storage.k8s.io &lt;span class="s2"&gt;"fast"&lt;/span&gt; not found

$ kubectl get storageclass
NAME                 PROVISIONER             RECLAIMPOLICY
standard &lt;span class="o"&gt;(&lt;/span&gt;default&lt;span class="o"&gt;)&lt;/span&gt;   rancher.io/local-path   Delete
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The claim asks for a storage class called &lt;code&gt;fast&lt;/code&gt;, and this cluster only has &lt;code&gt;standard&lt;/code&gt;, the default.&lt;/p&gt;

&lt;p&gt;A claim's storage class can't be changed after it's created, so patching it won't work. Fix the file, delete the claim and the Pod, and apply again. If you leave &lt;code&gt;storageClassName&lt;/code&gt; out, the default class is used.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl delete -f data.yaml
persistentvolumeclaim "data" deleted
pod "writer" deleted
$ kubectl apply -f data.yaml
persistentvolumeclaim/data created
pod/writer created

$ kubectl get pvc data
NAME   STATUS   VOLUME                                     CAPACITY
data   Bound    pvc-b4702856-8cd0-429d-9a9a-27a50929697d   1Gi
$ kubectl get pod writer
NAME     READY   STATUS    RESTARTS   AGE
writer   1/1     Running   0          30s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; Pending with an unbound claim? Check the claim's storage class against &lt;code&gt;kubectl get storageclass&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/IXs9GyOIQIc" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;
&lt;h2&gt;
  
  
  2. ContainerCreating: a volume can't be mounted
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;web&lt;/code&gt; has been in ContainerCreating for over a minute. That status gives no reason at all. The events do:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl describe pod web | tail -1
  Warning  FailedMount  20s (x2 over 80s)  kubelet  MountVolume.SetUp failed for volume "html" : configmap "site-html" not found

$ kubectl get configmaps
NAME               DATA   AGE
app-config         1      80s
kube-root-ca.crt   1      16m
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The Pod mounts a ConfigMap called &lt;code&gt;site-html&lt;/code&gt; as a volume, and it doesn't exist. A ConfigMap or Secret that you mount as a volume has to exist, unless you mark it &lt;code&gt;optional: true&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The kubelet keeps retrying the mount, so you don't need to touch the Pod. Create the ConfigMap, and it starts by itself:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ kubectl create configmap site-html --from-file=index.html
configmap/site-html created

$ kubectl get pod web
NAME   READY   STATUS    RESTARTS   AGE
web    1/1     Running   0          110s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; stuck in ContainerCreating? Read the events. FailedMount usually means a missing ConfigMap or Secret.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/i-A00IHfj6o" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Init:CrashLoopBackOff: read the init container's logs
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;shop&lt;/code&gt; has an init container called &lt;code&gt;fetch&lt;/code&gt; that downloads the page nginx will serve. nginx hasn't started, and it won't until &lt;code&gt;fetch&lt;/code&gt; succeeds.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get pod shop
NAME   READY   STATUS                  RESTARTS      AGE
shop   0/1     Init:CrashLoopBackOff   5 (38s ago)   110s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Plain &lt;code&gt;kubectl logs shop&lt;/code&gt; targets the app container, which hasn't started yet. Ask for the init container by name with &lt;code&gt;-c&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ kubectl logs shop -c fetch
wget: bad address &lt;span class="s1"&gt;'content'&lt;/span&gt;

$ kubectl get svc
NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT&lt;span class="o"&gt;(&lt;/span&gt;S&lt;span class="o"&gt;)&lt;/span&gt;   AGE
kubernetes   ClusterIP   10.96.0.1    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;none&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;        443/TCP   17m
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;code&gt;fetch&lt;/code&gt; downloads from a Service named &lt;code&gt;content&lt;/code&gt;, and there isn't one. Deploy it and expose it:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ kubectl create deployment content --image=nginx:1.29
deployment.apps/content created
$ kubectl expose deployment content --port=80
service/content exposed

$ kubectl get pod shop
NAME   READY   STATUS    RESTARTS   AGE
shop   1/1     Running   0          2m50s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The kubelet restarts &lt;code&gt;fetch&lt;/code&gt; once more, this time it succeeds, and nginx starts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; Init:CrashLoopBackOff? Read the init container's logs with &lt;code&gt;-c&lt;/code&gt;. The reason is almost always there.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/jxhmomgNERk" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;
&lt;h2&gt;
  
  
  4. CreateContainerConfigError: the ConfigMap name is wrong
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;settings&lt;/code&gt; shows CreateContainerConfigError. The image pulled fine, but the container was never created:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ kubectl get pods
NAME        READY   STATUS                       ...
settings    0/1     CreateContainerConfigError   ...

$ kubectl describe pod settings &lt;span class="o"&gt;|&lt;/span&gt; tail -1
  Warning  Failed     17s &lt;span class="o"&gt;(&lt;/span&gt;x6 over 2m47s&lt;span class="o"&gt;)&lt;/span&gt;  kubelet  Error: configmap &lt;span class="s2"&gt;"app-conf"&lt;/span&gt; not found
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The Pod takes an environment variable from a ConfigMap called &lt;code&gt;app-conf&lt;/code&gt;. The ConfigMap we saw earlier is called &lt;code&gt;app-config&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can't edit the environment of a Pod that already exists. Fix the name in &lt;code&gt;settings.yaml&lt;/code&gt;, then replace the Pod:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ kubectl replace --force -f settings.yaml
pod &lt;span class="s2"&gt;"settings"&lt;/span&gt; deleted
pod/settings replaced

$ kubectl get pod settings
NAME       READY   STATUS    RESTARTS   AGE
settings   1/1     Running   0          20s
$ kubectl &lt;span class="nb"&gt;exec&lt;/span&gt; settings -- printenv APP_MODE
production
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If the name is right and it still fails, check the namespace. A Pod can only use ConfigMaps from its own namespace.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; CreateContainerConfigError? Compare the name in the error with what actually exists.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/m7F7M3Noua4" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;
&lt;h2&gt;
  
  
  5. CreateContainerConfigError: the Secret has the wrong key
&lt;/h2&gt;

&lt;p&gt;Same status, different message:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl describe pod db-client | tail -1
  Warning  Failed     8s (x7 over 3m8s)  kubelet  Error: couldn't find key password in Secret default/db-pass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The Secret exists, but the Pod asks for a key called &lt;code&gt;password&lt;/code&gt;. Describe the Secret. It shows the key names and sizes, never the values:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl describe secret db-pass
Name:         db-pass
Namespace:    default
...
Type:  Opaque

Data
====
pass:  11 bytes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The only key is &lt;code&gt;pass&lt;/code&gt;. This time the Secret is wrong, not the Pod, so recreate it with the key the Pod expects:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ kubectl delete secret db-pass
secret &lt;span class="s2"&gt;"db-pass"&lt;/span&gt; deleted
$ kubectl create secret generic db-pass \
    --from-literal=password=Sup3rS3cret
secret/db-pass created

$ kubectl get pod db-client
NAME        READY   STATUS    RESTARTS   AGE
db-client   1/1     Running   0          3m30s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The kubelet keeps retrying on its own, so &lt;code&gt;db-client&lt;/code&gt; starts without being touched. On a real cluster, keep passwords out of your shell history: &lt;code&gt;--from-file&lt;/code&gt; or your secret manager is a better habit than &lt;code&gt;--from-literal&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; "couldn't find key"? The name is right. Compare the keys.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/S05XZ3K-UAA" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;
&lt;h2&gt;
  
  
  Cheat sheet
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;th&gt;Where to look&lt;/th&gt;
&lt;th&gt;Usual cause&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Pending, "unbound immediate PersistentVolumeClaims"&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;describe pvc&lt;/code&gt;, &lt;code&gt;get storageclass&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;The claim's storage class doesn't exist&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ContainerCreating for minutes&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;describe pod&lt;/code&gt;, Events: FailedMount&lt;/td&gt;
&lt;td&gt;A ConfigMap or Secret mounted as a volume is missing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Init:CrashLoopBackOff&lt;/td&gt;
&lt;td&gt;&lt;code&gt;logs &amp;lt;pod&amp;gt; -c &amp;lt;init container&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The init container fails, often because something it needs doesn't exist yet&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CreateContainerConfigError, "not found"&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;describe pod&lt;/code&gt;, &lt;code&gt;get configmaps&lt;/code&gt; / &lt;code&gt;get secrets&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Wrong name, or the object is in another namespace&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CreateContainerConfigError, "couldn't find key"&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;describe secret&lt;/code&gt; / &lt;code&gt;describe configmap&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;The object exists but the key name differs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h2&gt;
  
  
  Try it yourself
&lt;/h2&gt;

&lt;p&gt;Every terminal output above comes from one session in PodSim, a free, open-source Kubernetes training simulator I'm building. It runs in your browser, so there's no cluster to set up, and each lab checks your fix.&lt;/p&gt;

&lt;p&gt;Open &lt;a href="https://sdtslmn.github.io/podsim/" rel="noopener noreferrer"&gt;sdtslmn.github.io/podsim&lt;/a&gt;, go to Labs, and pick:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;I07&lt;/strong&gt; Keep data in a PersistentVolumeClaim&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I08&lt;/strong&gt; Mount configuration files from a ConfigMap&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I05&lt;/strong&gt; Prepare content with an init container&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;B13&lt;/strong&gt; Configure a Pod with a ConfigMap&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;B14&lt;/strong&gt; Keep a password in a Secret&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I09&lt;/strong&gt; Configure a Pod with a ConfigMap and a Secret&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/sdtslmn" rel="noopener noreferrer"&gt;
        sdtslmn
      &lt;/a&gt; / &lt;a href="https://github.com/sdtslmn/podsim" rel="noopener noreferrer"&gt;
        podsim
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      PodSim: Kubernetes training simulator. Practice kubectl on a simulated cluster in the browser or terminal, with guided labs.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;PodSim&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;A Kubernetes training simulator. Practice &lt;code&gt;kubectl&lt;/code&gt; on a simulated cluster, in your terminal or in the browser, along a training path from your first Pod to real-life production scenarios. Every lab checks your work automatically, and a CKAD track with two timed mock exams prepares you for the certification.&lt;/p&gt;

&lt;p&gt;Nothing here runs real containers. The simulator models how Kubernetes objects behave: the scheduler places Pods on nodes, the kubelet pulls images and starts containers, Deployments roll out new ReplicaSets, Services collect endpoints. You see the same states, events and error messages a real cluster gives you, without installing anything or paying for a cluster.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it in the browser:&lt;/strong&gt; &lt;a href="https://sdtslmn.github.io/podsim/" rel="nofollow noopener noreferrer"&gt;https://sdtslmn.github.io/podsim/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/sdtslmn/podsim/docs/images/web-lab.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fsdtslmn%2Fpodsim%2FHEAD%2Fdocs%2Fimages%2Fweb-lab.png" alt="The browser version running the Services lab"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why a simulator&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;Real practice clusters (Killercoda, KodeKloud, kind, minikube) are great once you know the basics. For a first contact they are often too much: you wait for VMs, things break in ways that have nothing to do…&lt;/p&gt;&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/sdtslmn/podsim" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;h2&gt;
  
  
  Keep going
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Part 1:&lt;/strong&gt; &lt;a href="https://dev.to/sdtslmn/why-isnt-my-pod-running-5-kubernetes-errors-explained-and-fixed-4aec"&gt;Why isn't my Pod running? 5 Kubernetes errors explained and fixed&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 2:&lt;/strong&gt; &lt;a href="https://dev.to/sdtslmn/pod-running-but-app-unreachable-5-kubernetes-network-problems-explained-and-fixed-2nfh"&gt;Pod running but app unreachable? 5 network problems explained and fixed&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shorts from this post:&lt;/strong&gt; &lt;a href="https://www.youtube.com/shorts/IXs9GyOIQIc" rel="noopener noreferrer"&gt;PVC stuck in Pending&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/i-A00IHfj6o" rel="noopener noreferrer"&gt;ContainerCreating with FailedMount&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/jxhmomgNERk" rel="noopener noreferrer"&gt;Init:CrashLoopBackOff&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/m7F7M3Noua4" rel="noopener noreferrer"&gt;ConfigMap not found&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/S05XZ3K-UAA" rel="noopener noreferrer"&gt;Secret key missing&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Get the next one:&lt;/strong&gt; a new one-minute Kubernetes fix goes out most days on &lt;a href="https://www.youtube.com/@KubernetesInaMinute?sub_confirmation=1" rel="noopener noreferrer"&gt;Kubernetes in a Minute&lt;/a&gt;. I also run &lt;a href="https://www.youtube.com/@AWSCloudInAMinute" rel="noopener noreferrer"&gt;AWS Cloud in a Minute&lt;/a&gt; and &lt;a href="https://www.youtube.com/@AzureCloudInAMinute" rel="noopener noreferrer"&gt;Azure Cloud in a Minute&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="noopener noreferrer"&gt;Persistent Volumes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/concepts/storage/storage-classes/" rel="noopener noreferrer"&gt;Storage Classes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/concepts/configuration/configmap/" rel="noopener noreferrer"&gt;ConfigMaps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/concepts/configuration/secret/" rel="noopener noreferrer"&gt;Secrets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/init-containers/" rel="noopener noreferrer"&gt;Init Containers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/" rel="noopener noreferrer"&gt;Pod Lifecycle&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/tasks/debug/debug-application/debug-pods/" rel="noopener noreferrer"&gt;Debug Pods&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Questions, or a status you keep getting stuck on? Leave a comment.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Kubernetes® is a registered trademark of The Linux Foundation. This post is independent and not affiliated with or endorsed by The Linux Foundation or the CNCF.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Azure Deployment Failed? 12 Error Codes and How to Fix Each One</title>
      <dc:creator>Sedat SALMAN</dc:creator>
      <pubDate>Mon, 30 Nov 2026 13:00:00 +0000</pubDate>
      <link>https://dev.to/sdtslmn/azure-deployment-failed-12-error-codes-and-how-to-fix-each-one-27ob</link>
      <guid>https://dev.to/sdtslmn/azure-deployment-failed-12-error-codes-and-how-to-fix-each-one-27ob</guid>
      <description>&lt;p&gt;&lt;em&gt;Prefer video? The full walkthrough is at the top of this post, and the most common cases have one-minute Shorts right where they come up. This guide first went out on the &lt;a href="https://azurecloudinaminute.substack.com/subscribe" rel="noopener noreferrer"&gt;Azure Cloud in a Minute newsletter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The one-minute answer
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The problem:&lt;/strong&gt; you deploy a VM, a storage account or a whole Bicep file, and Azure answers “Deployment failed” with a long block of JSON. Sometimes nothing was created. Sometimes half of it was.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Azure decides:&lt;/strong&gt; every deployment goes through Azure Resource Manager in three steps. Validation checks the file itself. Preflight checks the request against your subscription before anything is created: policies, permissions, sizes, quotas and names. Then the deployment runs, and each resource can still fail on its own.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where to look first:&lt;/strong&gt; the error code. It’s one word, such as &lt;code&gt;SkuNotAvailable&lt;/code&gt; or &lt;code&gt;RequestDisallowedByPolicy&lt;/code&gt;, and it names the cause more precisely than the message around it. Find the code, then go straight to that cause below.&lt;/p&gt;

&lt;p&gt;The rest of this guide explains where each kind of error shows up, goes through the common codes grouped by what they mean, and ends with a checklist.&lt;/p&gt;

&lt;h2&gt;
  
  
  How a deployment fails
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7k7juv08z25dppgiyfqy.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7k7juv08z25dppgiyfqy.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are three kinds of error, and they show up in different places:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Validation errors&lt;/strong&gt; come from the file: a typo in an expression, a missing bracket. A Bicep file with a syntax error doesn’t compile, so it never reaches Azure. Your editor catches these.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Preflight errors&lt;/strong&gt; happen after you start the deployment but before anything is created, such as a parameter value that isn’t allowed. They appear in the resource group’s activity log, but not in its deployment history.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment errors&lt;/strong&gt; happen while resources are being created. They appear in both the deployment history and the activity log. Resources that were created before the failure stay where they are.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using the portal doesn’t change this. When you click Create, the portal builds a template and deploys it, so a portal failure carries the same error codes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Find the error code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvva80imk60kfrnxod77h.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvva80imk60kfrnxod77h.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In the portal:&lt;/strong&gt; open the resource group → Settings → Deployments, select the failed deployment and open Error details. If the deployment isn’t listed, it failed in preflight: open the resource group’s Activity log instead and look for the failed operation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With the Azure CLI:&lt;/strong&gt; show the deployment’s error, then list the operations that failed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;az deployment group show --resource-group myRG --name myDeployment \
  --query properties.error
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;az deployment operation group list --resource-group myRG --name myDeployment \
  --query "[?properties.provisioningState=='Failed']"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second command shows which resource failed and its status message, which holds the code.&lt;/p&gt;

&lt;h2&gt;
  
  
  The causes, one by one
&lt;/h2&gt;

&lt;p&gt;They fall into four groups. The first two are preflight checks against your subscription. The third is the file. The fourth is something else already in the way.&lt;/p&gt;

&lt;h3&gt;
  
  
  Azure says no before it starts
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftdg9dbfziana9521nkvc.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftdg9dbfziana9521nkvc.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. RequestDisallowedByPolicy.&lt;/strong&gt; An Azure Policy assignment blocks what you’re deploying, such as a public IP on a network interface, a region outside the allowed list or a missing tag. The error names the policy assignment and the policy definition, with their IDs.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; read the rule, then change your deployment to meet it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;az policy definition show --name &amp;lt;definition-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you really need an exception, ask whoever owns the policy. Policy exemptions exist for this, but they are a governance decision, not something to work around.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/AuwBoZm3axA" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. RequestDisallowedByAzure.&lt;/strong&gt; This one isn’t a policy you can see or change. It’s common on Azure for Students and similar subscriptions, and the message reads: “This policy maintains a set of best available regions where your subscription can deploy resources.”&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; deploy to a region your subscription allows. The message itself says to contact support if you need other regions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. AuthorizationFailed.&lt;/strong&gt; Your account or service principal doesn’t have the permission it needs at that scope. To deploy a file, you need write access on every resource in it plus all operations on &lt;code&gt;Microsoft.Resources/deployments&lt;/code&gt;. Deploying a VM, for example, needs &lt;code&gt;Microsoft.Compute/virtualMachines/write&lt;/code&gt; and &lt;code&gt;Microsoft.Resources/deployments/*&lt;/code&gt;. The error message names the action that was refused and the scope.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; ask for a role that covers that action at that scope. Contributor on the resource group covers both. This error can also appear when a resource provider isn’t registered, which is the next cause.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. MissingSubscriptionRegistration or NoRegisteredProviderFound.&lt;/strong&gt; The subscription isn’t registered for the resource provider, such as &lt;code&gt;Microsoft.Cdn&lt;/code&gt;. Deploying a Bicep file registers the providers defined in it, and the portal usually does the same, but supporting resources that aren’t in your file, such as monitoring or security resources, can need a provider you have to register yourself.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; register the namespace named in the error. This needs the &lt;code&gt;/register/action&lt;/code&gt; permission, which Contributor and Owner include.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;az provider register --namespace Microsoft.Cdn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  There’s no room for it
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1kug2v69l4qb2ou647ua.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1kug2v69l4qb2ou647ua.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. SkuNotAvailable.&lt;/strong&gt; The size you asked for isn’t offered in that region or zone for your subscription. The message says the requested size “is currently not available in location” with the location, zones and subscription. It also happens with Spot VMs when there’s no Spot capacity.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; list the sizes with their restrictions. Without &lt;code&gt;--all&lt;/code&gt;, the command hides restricted sizes, which is exactly what you want to see.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;az vm list-skus --location eastus --size Standard_D --all --output table
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A restriction such as &lt;code&gt;NotAvailableForSubscription&lt;/code&gt; confirms it. Pick another size, zone or region, or submit a SKU request to Azure Support if you need that one.&lt;/p&gt;

&lt;p&gt;This one confuses people most when the quota is already approved, so here it is in under a minute:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/N7LR_mFvOFc" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. OperationNotAllowed (quota).&lt;/strong&gt; The deployment would take you over a quota. The message is specific: “Operation results in exceeding quota limits of Core. Maximum allowed: 4, Current in use: 4, Additional requested: 2.” For VMs, two limits apply at once: total regional vCPUs and the vCPUs for that VM family. Either one can stop you. Some quotas count resources per resource group instead, and those fail with &lt;code&gt;ResourceQuotaExceeded&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; check usage in that region, then request an increase: Subscriptions → your subscription → Usage + quotas → Request increase. Quotas are per region, so request it where you deploy.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;az vm list-usage --location eastus --output table
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;7. AllocationFailed or ZonalAllocationFailed.&lt;/strong&gt; Your quota is fine and the size exists, but Azure doesn’t have capacity for it right now: “Allocation failed. We do not have sufficient capacity for the requested VM size in this region.” A related code, &lt;code&gt;OverconstrainedAllocationRequest&lt;/code&gt;, means capacity may exist but not for every constraint you asked for at once, such as a zone plus accelerated networking plus a proximity placement group.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; this is often temporary, so retry later. Otherwise try a different size or zone, or drop a constraint. For a planned large deployment, an on-demand capacity reservation holds capacity in advance.&lt;/p&gt;

&lt;h3&gt;
  
  
  The file is wrong
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnn5it9x9ri4da9pf309y.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnn5it9x9ri4da9pf309y.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. InvalidTemplate.&lt;/strong&gt; The template failed validation. The usual reasons are an expression with a syntax mistake, a parameter value that isn’t in the template’s allowed values, or a circular dependency where resources wait on each other.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; use VS Code with the Bicep extension, which flags syntax errors as you type. For allowed values, deploy with one of the values the template lists. For a circular dependency, remove &lt;code&gt;dependsOn&lt;/code&gt; entries you don’t need. Bicep already adds a dependency when one resource references another.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9. ResourceNotFound or ParentResourceNotFound.&lt;/strong&gt; Something in the file refers to a resource that doesn’t exist yet. Resource Manager creates resources in parallel when it can, so a web app can be created before the App Service plan it points to. It also happens when the resource lives in another resource group and the file doesn’t say so.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; reference the other resource by its symbolic name, such as &lt;code&gt;servicePlan.id&lt;/code&gt;, which makes Azure wait for it. For a resource that already exists, declare it with the &lt;code&gt;existing&lt;/code&gt; keyword, and add &lt;code&gt;scope: resourceGroup(rgname)&lt;/code&gt; if it’s in another resource group.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10. The name is taken or invalid.&lt;/strong&gt; Storage account names must be 3 to 24 characters, use only lowercase letters and numbers, and be unique across all of Azure. &lt;code&gt;AccountNameInvalid&lt;/code&gt; means the characters are wrong. &lt;code&gt;StorageAccountAlreadyTaken&lt;/code&gt; means someone, anywhere, already has that name.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; add a unique suffix. &lt;code&gt;uniqueString&lt;/code&gt; returns 13 characters, so keep the prefix to 11 or fewer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: 'storage${uniqueString(resourceGroup().id)}'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Something else is in the way
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F15kaqowind264nra8zgc.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F15kaqowind264nra8zgc.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11. AnotherOperationInProgress, DeploymentActiveAndUneditable or Conflict.&lt;/strong&gt; Another operation is running on the same resource, or another deployment is running in the same resource group. &lt;code&gt;Conflict&lt;/code&gt; can also mean the resource isn’t in a state that allows the change. Microsoft’s example is a disk resize that’s only allowed when the VM is created or deallocated.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; wait for the other operation to finish, then retry. For a state conflict, put the resource in the state the change needs, such as deallocating the VM first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;12. DeploymentQuotaExceeded.&lt;/strong&gt; A resource group keeps up to 800 deployments in its history. Azure deletes old entries automatically once the history passes 700, down to 600. Two things stop that cleanup: a CanNotDelete lock on the resource group or subscription, and a deploying account without &lt;code&gt;Microsoft.Resources/deployments/delete&lt;/code&gt; permission.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; remove the lock or grant the permission so the cleanup can run, or delete old entries yourself. Deleting a history entry doesn’t touch the resources it deployed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;az deployment group delete --resource-group myRG --name oldDeployment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How to check it
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjysywlssuxmoz3rlybmj.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjysywlssuxmoz3rlybmj.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Get the exact code.&lt;/strong&gt; Deployments → Error details, or the activity log for preflight failures.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Find the failed resource.&lt;/strong&gt; List the failed operations, as above. A long deployment can fail on one resource out of fifty.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Match the code to a cause above.&lt;/strong&gt; Most fixes follow directly from the code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Check sizes and quota before redeploying VMs.&lt;/strong&gt; Run &lt;code&gt;az vm list-skus --all&lt;/code&gt; and &lt;code&gt;az vm list-usage&lt;/code&gt; for the target region.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Test without creating anything.&lt;/strong&gt; Validate runs the preflight checks against your subscription. What-if shows what the deployment would create, change or delete.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;az deployment group validate --resource-group myRG --template-file main.bicep
az deployment group what-if --resource-group myRG --template-file main.bicep
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;6. Redeploy.&lt;/strong&gt; Resources that succeeded the first time are already there. If you reuse the same deployment name, the new run replaces the old entry in the history.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;You have the exact error code, not just “Deployment failed”.&lt;/li&gt;
&lt;li&gt;You know which resource failed, from the failed operations list.&lt;/li&gt;
&lt;li&gt;No policy assignment denies it, or you’ve changed the deployment to meet the policy.&lt;/li&gt;
&lt;li&gt;The region is one your subscription allows.&lt;/li&gt;
&lt;li&gt;Your account can write the resources and &lt;code&gt;Microsoft.Resources/deployments&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The resource providers it needs are registered.&lt;/li&gt;
&lt;li&gt;The VM size isn’t restricted for your subscription in that region and zone.&lt;/li&gt;
&lt;li&gt;Regional vCPU quota and VM family quota both cover it.&lt;/li&gt;
&lt;li&gt;The file validates, with allowed parameter values and no circular dependencies.&lt;/li&gt;
&lt;li&gt;References to other resources use symbolic names, or &lt;code&gt;existing&lt;/code&gt; with the right scope.&lt;/li&gt;
&lt;li&gt;Globally unique names have a unique suffix.&lt;/li&gt;
&lt;li&gt;No other operation or deployment is running on the same resource or resource group.&lt;/li&gt;
&lt;li&gt;The deployment history has room, with no lock blocking the cleanup.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  From the field
&lt;/h2&gt;

&lt;p&gt;Two public threads on Microsoft Q&amp;amp;A this year show the two codes that confuse people most.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quota approved, size still not available.&lt;/strong&gt; In April 2026, a user had 65 vCPUs of approved quota in East US, but the portal showed “Size not available” for the Bsv2, Easv5 and Easv6 sizes, and deployments failed. Support had confirmed the quota was fine. An MVP’s reply named the real issue: regional capacity, not quota. A quota is permission to use vCPUs. It doesn’t guarantee that a size is offered to your subscription, or has capacity, in that region. Microsoft’s moderator asked for &lt;code&gt;az vm list-skus --all&lt;/code&gt; output and its Restrictions column, where &lt;code&gt;NotAvailableForSubscription&lt;/code&gt; would confirm it, and suggested checking each zone and trying East US 2 or Central US. (&lt;a href="https://learn.microsoft.com/en-us/answers/questions/5860830/unable-to-deploy-vm-sizes-despite-approved-quota" rel="noopener noreferrer"&gt;thread&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Student subscriptions and regions.&lt;/strong&gt; In March and June 2026, Azure for Students users got &lt;code&gt;RequestDisallowedByAzure&lt;/code&gt; when creating resources, including a Microsoft Foundry resource. The accepted answers explained that these subscriptions are usually limited to about five regions that vary from one subscription to another, and showed where to look: Azure Policy → Authoring → Assignments, the assignment named “Allowed resource deployment regions”, and its Allowed locations parameter. Other replies were more cautious. A Microsoft reply in June said there’s no direct list of allowed regions for these subscriptions, a reply in March suggested trying the regions the portal offers during creation, and both pointed to a Pay-As-You-Go subscription (or, in June, an institutional one) when the service isn’t available in any allowed region. (&lt;a href="https://learn.microsoft.com/en-us/answers/questions/5826596/my-subscription-is-restricted-to-certain-regions-i" rel="noopener noreferrer"&gt;March thread&lt;/a&gt;, &lt;a href="https://learn.microsoft.com/answers/a/12822623" rel="noopener noreferrer"&gt;June thread&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;In both cases the error code was the answer. The message around it was what sent people the wrong way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep going
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Related guides:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/sdtslmn/azure-private-endpoint-not-working-8-causes-and-most-are-dns-4f29"&gt;Azure private endpoint not working? 8 causes, and most are DNS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://azurecloudinaminute.substack.com/p/azure-vm-cant-connect" rel="noopener noreferrer"&gt;Azure VM can't connect: 9 causes with NSGs and routes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://azurecloudinaminute.substack.com/p/app-registration-vs-enterprise-application" rel="noopener noreferrer"&gt;App registration vs enterprise application vs managed identity&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Shorts from this guide:&lt;/strong&gt; &lt;a href="https://www.youtube.com/shorts/AuwBoZm3axA" rel="noopener noreferrer"&gt;RequestDisallowedByPolicy names the policy&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/N7LR_mFvOFc" rel="noopener noreferrer"&gt;quota approved but the VM size isn't available&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get the next one:&lt;/strong&gt; new guides go out first on the &lt;a href="https://azurecloudinaminute.substack.com/subscribe" rel="noopener noreferrer"&gt;Azure Cloud in a Minute newsletter&lt;/a&gt;, with a long video and Shorts on &lt;a href="https://www.youtube.com/@AzureCloudInAMinute?sub_confirmation=1" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;. I also run &lt;a href="https://www.youtube.com/@AWSCloudInAMinute" rel="noopener noreferrer"&gt;AWS Cloud in a Minute&lt;/a&gt; and &lt;a href="https://www.youtube.com/@KubernetesInaMinute" rel="noopener noreferrer"&gt;Kubernetes in a Minute&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;p&gt;From Microsoft Learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/azure-resource-manager/troubleshooting/common-deployment-errors" rel="noopener noreferrer"&gt;Troubleshoot common Azure deployment errors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/azure-resource-manager/troubleshooting/find-error-code" rel="noopener noreferrer"&gt;Find error codes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/azure-resource-manager/troubleshooting/error-policy-requestdisallowedbypolicy" rel="noopener noreferrer"&gt;Resolve RequestDisallowedByPolicy errors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/deploy-cli" rel="noopener noreferrer"&gt;Deploy Bicep files with the Azure CLI (required permissions)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/azure-resource-manager/troubleshooting/error-register-resource-provider" rel="noopener noreferrer"&gt;Resolve errors for resource provider registration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-providers-and-types" rel="noopener noreferrer"&gt;Resource providers and types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/azure-resource-manager/troubleshooting/error-sku-not-available" rel="noopener noreferrer"&gt;Resolve errors for SKU not available&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/azure-resource-manager/troubleshooting/error-resource-quota" rel="noopener noreferrer"&gt;Resolve errors for resource quotas&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/allocation-failure" rel="noopener noreferrer"&gt;Troubleshoot allocation failures for Azure VMs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/azure-resource-manager/troubleshooting/error-invalid-template" rel="noopener noreferrer"&gt;Resolve errors for invalid template&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/azure-resource-manager/troubleshooting/error-not-found" rel="noopener noreferrer"&gt;Resolve resource not found errors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/azure-resource-manager/troubleshooting/error-storage-account-name" rel="noopener noreferrer"&gt;Resolve errors for storage account names&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deployment-history-deletions" rel="noopener noreferrer"&gt;Automatic deletions from deployment history&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-what-if" rel="noopener noreferrer"&gt;Bicep deployment what-if operation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Field cases from Microsoft Q&amp;amp;A, linked above.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Independent writer, not affiliated with or endorsed by Microsoft.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>azure</category>
      <category>devops</category>
      <category>bicep</category>
      <category>cloud</category>
    </item>
    <item>
      <title>AssumeRole Access Denied? 7 Causes and How to Find Yours</title>
      <dc:creator>Sedat SALMAN</dc:creator>
      <pubDate>Sun, 29 Nov 2026 13:00:00 +0000</pubDate>
      <link>https://dev.to/aws-builders/assumerole-access-denied-7-causes-and-how-to-find-yours-54n6</link>
      <guid>https://dev.to/aws-builders/assumerole-access-denied-7-causes-and-how-to-find-yours-54n6</guid>
      <description>&lt;p&gt;&lt;em&gt;Prefer video? The full walkthrough is at the top of this post, and the most common cases have one-minute Shorts right where they come up. This guide first went out on the &lt;a href="https://awscloudinaminute.substack.com/subscribe" rel="noopener noreferrer"&gt;AWS Cloud in a Minute newsletter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The one-minute answer
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The problem:&lt;/strong&gt; your app, script or pipeline calls &lt;code&gt;sts:AssumeRole&lt;/code&gt;, and AWS answers &lt;code&gt;AccessDenied&lt;/code&gt;. The role exists, the ARN looks right, and someone says it worked last week.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How AWS decides:&lt;/strong&gt; assuming a role takes two yeses. The role’s trust policy has to name you as a principal it trusts, and your own permissions have to allow &lt;code&gt;sts:AssumeRole&lt;/code&gt; on that role. On top of that, any condition in the trust policy has to be met, and nothing in your organization can deny it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where to look first:&lt;/strong&gt; read the full error message. It says either &lt;code&gt;no role trust policy allows&lt;/code&gt; or names another policy type, such as identity-based or service control policy. That tells you which side to fix, the role’s account or yours.&lt;/p&gt;

&lt;p&gt;The rest of this guide explains how AssumeRole is evaluated, goes through the causes in the order worth checking, and ends with a checklist.&lt;/p&gt;

&lt;h2&gt;
  
  
  How AssumeRole decides
&lt;/h2&gt;

&lt;p&gt;Every role has two policies, and they answer different questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The trust policy&lt;/strong&gt; (on the role) says who may assume the role. Its &lt;code&gt;Principal&lt;/code&gt; can be an account, a user, a role or an AWS service.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The permissions policies&lt;/strong&gt; (on the role) say what the role can do once you have it. They play no part in whether you can assume it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your side has its own say. Whether you need &lt;code&gt;sts:AssumeRole&lt;/code&gt; in your identity-based policy depends on where the role lives:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Same account, trust policy names your user or role ARN:&lt;/strong&gt; the trust policy alone is enough, unless a permissions boundary or session policy on your role leaves it out.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Same account, trust policy names the account&lt;/strong&gt; (&lt;code&gt;arn:aws:iam::111122223333:root&lt;/code&gt;): that delegates the decision to your account’s identity-based policies, so yours must also allow &lt;code&gt;sts:AssumeRole&lt;/code&gt; on the role.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Another account:&lt;/strong&gt; always both. Their trust policy must name you or your account, and your identity policy must allow &lt;code&gt;sts:AssumeRole&lt;/code&gt; on their role ARN.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Three more things can stop the call even when both say yes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Conditions&lt;/strong&gt; in the trust policy, such as an external ID, MFA, a source IP range or your organization ID, must all be met.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Guardrails&lt;/strong&gt; never grant anything but can deny: a service control policy (SCP) on your account, a resource control policy (RCP) on the role’s account, or a permissions boundary on your role. RCPs cover AWS STS, but not resources in the management account. Neither SCPs nor RCPs restrict service-linked roles. If the call goes through an STS VPC endpoint, its endpoint policy can deny it too.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Session limits:&lt;/strong&gt; &lt;code&gt;DurationSeconds&lt;/code&gt; can’t exceed the role’s maximum session duration, which is 1 to 12 hours, and a role assumed from another role is limited to one hour. Asking for more fails with a ValidationError, not AccessDenied.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsidrfolq37617z9ef0b9.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsidrfolq37617z9ef0b9.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Read the error first
&lt;/h2&gt;

&lt;p&gt;An AssumeRole denial usually looks like this, and the end of it is the clue:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User: arn:aws:iam::111122223333:user/John is not authorized to perform: sts:AssumeRole
because no role trust policy allows the sts:AssumeRole action
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first part tells you &lt;strong&gt;who AWS thinks you are&lt;/strong&gt;. If that ARN isn’t the user or role you expected, stop there: the request is running with different credentials.&lt;/p&gt;

&lt;p&gt;The last part tells you &lt;strong&gt;which policy said no&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;no role trust policy allows&lt;/code&gt; or &lt;code&gt;with an explicit deny in the role trust policy&lt;/code&gt;: the problem is on the role’s side. Check the trust policy’s principal and conditions.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;no identity-based policy allows&lt;/code&gt;: your own policy doesn’t allow &lt;code&gt;sts:AssumeRole&lt;/code&gt; on that role.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;no permissions boundary allows&lt;/code&gt;, &lt;code&gt;no session policy allows&lt;/code&gt;, or a service control or resource control policy: a guardrail is blocking it. For an explicit deny in a managed policy, an SCP or an RCP, the message can include that policy’s ARN when the call stays inside your account or organization. A deny in the trust policy or in an inline policy shows no ARN. If several policies deny the call, the message names only one, so fixing it can reveal the next.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the caller’s account, CloudTrail records the failed call as an &lt;code&gt;AssumeRole&lt;/code&gt; event with an &lt;code&gt;AccessDenied&lt;/code&gt; error code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbn6pyofzger1985bagg5.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbn6pyofzger1985bagg5.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The causes, one by one
&lt;/h2&gt;

&lt;p&gt;Check them in this order. The first five are on the role’s side, in its trust policy. The last two are on your side.&lt;/p&gt;

&lt;h3&gt;
  
  
  The trust policy says no
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmpm19o4gdobwusmbvha4.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmpm19o4gdobwusmbvha4.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The trust policy doesn’t name you.&lt;/strong&gt; The principal is a different account, a different role, or the ARN has a typo. Role names in ARNs are case sensitive, so &lt;code&gt;App-Role&lt;/code&gt; and &lt;code&gt;app-role&lt;/code&gt; are different roles. Often the caller is simply not who you think: a different CLI profile, or the default credentials of the machine.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; compare the ARN at the start of the error with the trust policy’s &lt;code&gt;Principal&lt;/code&gt;, then add your role ARN or your account.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The role was deleted and recreated.&lt;/strong&gt; When you save a trust policy that names a specific role or user, AWS stores that principal’s unique ID. Recreate the role with the same name and it gets a new ID, so the old trust policy no longer matches. The policy then shows a long ID where the ARN used to be.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; edit the trust policy, put the ARN back, and save it again.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/6eCjkmNDl7Q" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. A condition in the trust policy isn’t met.&lt;/strong&gt; The most common ones:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;sts:ExternalId&lt;/code&gt;: the caller has to pass the matching external ID, which third-party tools often require.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;aws:MultiFactorAuthPresent&lt;/code&gt;: the caller has to sign in with MFA, or pass the MFA device and code on the call.&lt;/li&gt;
&lt;li&gt;A source IP range, &lt;code&gt;aws:PrincipalOrgID&lt;/code&gt;, or a date that has passed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; read the trust policy’s &lt;code&gt;Condition&lt;/code&gt; block line by line and pass what it expects, such as &lt;code&gt;--external-id&lt;/code&gt; or &lt;code&gt;--serial-number&lt;/code&gt; with &lt;code&gt;--token-code&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxwfrq5wf7tadqvfmq8ds.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxwfrq5wf7tadqvfmq8ds.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. You pass session tags or a source identity.&lt;/strong&gt; If the call passes &lt;code&gt;--tags&lt;/code&gt; or &lt;code&gt;--transitive-tag-keys&lt;/code&gt;, or a service such as EKS Pod Identity tags the session, the trust policy also has to allow &lt;code&gt;sts:TagSession&lt;/code&gt;. Setting a source identity needs &lt;code&gt;sts:SetSourceIdentity&lt;/code&gt;, both in the trust policy and in the caller’s own policy. Once set, a source identity carries into chained sessions, so the next role needs it too. Without these, the call fails even though &lt;code&gt;sts:AssumeRole&lt;/code&gt; is allowed.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; add the extra action to the trust policy statement for that principal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. An AWS service can’t assume it.&lt;/strong&gt; A role for a service has to trust that service: &lt;code&gt;lambda.amazonaws.com&lt;/code&gt; for Lambda, &lt;code&gt;ec2.amazonaws.com&lt;/code&gt; for EC2, &lt;code&gt;ecs-tasks.amazonaws.com&lt;/code&gt; for ECS task roles. A role copied from a cross-account setup only trusts accounts, so the service is refused. You see that as an error from the service, not as an AccessDenied returned to you, and a condition such as &lt;code&gt;aws:SourceAccount&lt;/code&gt; can block it too. Attaching the role to the service is a separate check, which needs &lt;code&gt;iam:PassRole&lt;/code&gt;, not &lt;code&gt;sts:AssumeRole&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; add the service principal to the trust policy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Your side says no
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fys2tki1sb36qd1ka7cxi.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fys2tki1sb36qd1ka7cxi.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Your policy doesn’t allow sts:AssumeRole.&lt;/strong&gt; From another account you always need it, and in the same account you need it when the trust policy names the account rather than you. The &lt;code&gt;Resource&lt;/code&gt; has to cover the role’s ARN.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; allow &lt;code&gt;sts:AssumeRole&lt;/code&gt; on the exact role ARN. Avoid &lt;code&gt;*&lt;/code&gt;, which lets you assume any role that trusts your account.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. A guardrail denies it.&lt;/strong&gt; A service control policy on your account, a resource control policy on the role’s account, a permissions boundary or session policy on your role, or an STS VPC endpoint policy if the call goes through one. None of them grant anything, and the error names the type.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; you usually can’t change SCPs and RCPs yourself. Send the policy type and ARN from the error to whoever runs your organization.&lt;/p&gt;

&lt;h3&gt;
  
  
  Related errors that aren’t AccessDenied
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ValidationError on DurationSeconds:&lt;/strong&gt; you asked for a session longer than the role’s maximum session duration, which runs from 1 to 12 hours and defaults to 1 hour. When you assume a role from another role, called role chaining, the cap is one hour whatever the setting says. Ask for a shorter session, or raise the role’s maximum if the call isn’t chained.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RegionDisabled:&lt;/strong&gt; the caller used an STS Regional endpoint in a Region where STS isn’t active for the account. Activate the Region, or use another endpoint.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The role chaining limit catches a lot of people, so here it is in under a minute:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/iZVSGlZWl6o" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  How to check it
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkxd8ix8lg2llh0le407e.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkxd8ix8lg2llh0le407e.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run these from the same place as the failing call, with the same credentials.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Confirm who you are.&lt;/strong&gt; Compare this ARN with the trust policy’s principal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws sts get-caller-identity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Read the role’s trust policy and session limit.&lt;/strong&gt; Run this in the role’s account:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws iam get-role --role-name app-role \
  --query '{trust: Role.AssumeRolePolicyDocument, maxSeconds: Role.MaxSessionDuration}'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look at the &lt;code&gt;Principal&lt;/code&gt;, every &lt;code&gt;Condition&lt;/code&gt;, and whether a long ID sits where an ARN should be.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Reproduce the call by hand.&lt;/strong&gt; Add exactly what the trust policy expects, and nothing else:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws sts assume-role \
  --role-arn arn:aws:iam::444455556666:role/app-role \
  --role-session-name test \
  --external-id your-external-id
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If this works and your app doesn’t, the app is using other credentials or other parameters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Test your side.&lt;/strong&gt; The IAM policy simulator shows whether your identity-based policies allow &lt;code&gt;sts:AssumeRole&lt;/code&gt; on that role ARN, and which statement decides it. It includes SCPs but not RCPs, it doesn’t fetch the role’s trust policy for you, and AWS warns results can differ for role chaining. Use it for causes 6 and 7.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Find the failed call in CloudTrail.&lt;/strong&gt; Event history keeps management events for 90 days. Search the caller’s account, in the Region of the STS endpoint it used (the global endpoint logs to us-east-1), and filter on the event name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws cloudtrail lookup-events \
  --lookup-attributes AttributeKey=EventName,AttributeValue=AssumeRole \
  --max-results 20
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The failed calls carry &lt;code&gt;AccessDenied&lt;/code&gt; as the error code, and the error message usually carries the same denial text. A denied cross-account call isn’t logged in the role’s account at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;aws sts get-caller-identity&lt;/code&gt; shows the user or role you expect.&lt;/li&gt;
&lt;li&gt;The full error says which policy type denied the call.&lt;/li&gt;
&lt;li&gt;The trust policy’s &lt;code&gt;Principal&lt;/code&gt; names your role ARN or your account, spelled exactly, with the same case.&lt;/li&gt;
&lt;li&gt;The trust policy shows ARNs, not long IDs left behind by a deleted role.&lt;/li&gt;
&lt;li&gt;Every &lt;code&gt;Condition&lt;/code&gt; in the trust policy is met: external ID, MFA, source IP, organization.&lt;/li&gt;
&lt;li&gt;If you pass session tags or a source identity, the trust policy allows &lt;code&gt;sts:TagSession&lt;/code&gt; or &lt;code&gt;sts:SetSourceIdentity&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Roles for Lambda, EC2 or ECS trust the right service principal.&lt;/li&gt;
&lt;li&gt;Your identity policy allows &lt;code&gt;sts:AssumeRole&lt;/code&gt; on the exact role ARN, when you need it.&lt;/li&gt;
&lt;li&gt;No SCP, RCP, permissions boundary or session policy denies it.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DurationSeconds&lt;/code&gt; is within the role’s maximum, and one hour or less when you chain roles.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  From the field
&lt;/h2&gt;

&lt;p&gt;Multi-account setups live on AssumeRole: pipelines deploying into workload accounts, collectors in one account writing to central buckets in another. The AccessDenied calls that took longest were rarely a missing &lt;code&gt;sts:AssumeRole&lt;/code&gt;. They were a role someone had deleted and recreated, so the trust policy held a dead ID, or a trust policy condition, such as an external ID, that the caller didn’t send exactly as written. So the first thing I run now is &lt;code&gt;aws sts get-caller-identity&lt;/code&gt;, and the second is &lt;code&gt;aws iam get-role&lt;/code&gt; in the other account to read the trust policy. Those two usually show which side to fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep going
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Related guides:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/aws-builders/s3-access-denied-with-an-iam-allow-11-causes-and-how-to-find-yours-3gc3"&gt;S3 Access Denied with an IAM Allow? 11 causes and how to find yours&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://awscloudinaminute.substack.com/p/secrets-manager-vs-parameter-store" rel="noopener noreferrer"&gt;Secrets Manager vs Parameter Store vs KMS: which one to use&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/shorts/_LI8daD6Fyg" rel="noopener noreferrer"&gt;Short: IAM user vs IAM role, why your app shouldn't have access keys&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Shorts from this guide:&lt;/strong&gt; &lt;a href="https://www.youtube.com/shorts/6eCjkmNDl7Q" rel="noopener noreferrer"&gt;AccessDenied after recreating a role&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/iZVSGlZWl6o" rel="noopener noreferrer"&gt;AssumeRole fails for a 2-hour session&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get the next one:&lt;/strong&gt; new guides go out first on the &lt;a href="https://awscloudinaminute.substack.com/subscribe" rel="noopener noreferrer"&gt;AWS Cloud in a Minute newsletter&lt;/a&gt;, with a long video and Shorts on &lt;a href="https://www.youtube.com/@AWSCloudInAMinute?sub_confirmation=1" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;. I also run &lt;a href="https://www.youtube.com/@AzureCloudInAMinute" rel="noopener noreferrer"&gt;Azure Cloud in a Minute&lt;/a&gt; and &lt;a href="https://www.youtube.com/@KubernetesInaMinute" rel="noopener noreferrer"&gt;Kubernetes in a Minute&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;p&gt;All from AWS:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_roles.html" rel="noopener noreferrer"&gt;Troubleshoot IAM roles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_access-denied.html" rel="noopener noreferrer"&gt;Troubleshoot access denied error messages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html" rel="noopener noreferrer"&gt;Roles terms and concepts (trust policy, role chaining)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_permissions-to-switch.html" rel="noopener noreferrer"&gt;Grant a user permissions to switch roles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html" rel="noopener noreferrer"&gt;IAM JSON policy elements: Principal (deleted and recreated roles)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/blogs/security/how-to-use-trust-policies-with-iam-roles/" rel="noopener noreferrer"&gt;How to use trust policies with IAM roles (AWS Security Blog)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_third-party.html" rel="noopener noreferrer"&gt;Access to AWS accounts owned by third parties (external ID)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_configure-api-require.html" rel="noopener noreferrer"&gt;Secure API access with MFA&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html" rel="noopener noreferrer"&gt;Pass session tags in AWS STS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html" rel="noopener noreferrer"&gt;Resource control policies (RCPs)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html" rel="noopener noreferrer"&gt;Update the maximum session duration for a role&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html" rel="noopener noreferrer"&gt;Lambda execution role&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html" rel="noopener noreferrer"&gt;Test IAM policies with the IAM policy simulator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html" rel="noopener noreferrer"&gt;Working with CloudTrail event history&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Independent writer, not affiliated with or endorsed by Amazon Web Services.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>iam</category>
      <category>security</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Pod Running but App Unreachable? 5 Kubernetes Network Problems Explained and Fixed</title>
      <dc:creator>Sedat SALMAN</dc:creator>
      <pubDate>Sat, 28 Nov 2026 13:00:00 +0000</pubDate>
      <link>https://dev.to/sdtslmn/pod-running-but-app-unreachable-5-kubernetes-network-problems-explained-and-fixed-2nfh</link>
      <guid>https://dev.to/sdtslmn/pod-running-but-app-unreachable-5-kubernetes-network-problems-explained-and-fixed-2nfh</guid>
      <description>&lt;p&gt;Your Pod is Running, &lt;code&gt;kubectl get pods&lt;/code&gt; looks healthy, and nobody can reach your app. The request is refused, the name doesn't resolve, or nginx answers 404. Running only tells you the container started. It says nothing about whether traffic can find it.&lt;/p&gt;

&lt;p&gt;This post follows one request from the outside in, goes through the five problems that break it most often, and fixes each one with real terminal output. The video at the top covers the same ground in five and a half minutes, and each problem has a one-minute Short right where it comes up.&lt;/p&gt;

&lt;p&gt;If your Pod isn't even Running yet, start with part 1 of this series:&lt;/p&gt;


&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/sdtslmn/why-isnt-my-pod-running-5-kubernetes-errors-explained-and-fixed-4aec" class="crayons-story__hidden-navigation-link"&gt;Why Isn't My Pod Running? 5 Kubernetes Errors Explained and Fixed&lt;/a&gt;
    &lt;div class="crayons-article__cover crayons-article__cover__image__feed"&gt;
      &lt;iframe src="https://www.youtube.com/embed/t5UHEEcZkr0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" title="Why Isn't My Pod Running? 5 Kubernetes Errors Explained and Fixed"&gt;&lt;/iframe&gt;
    &lt;/div&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/sdtslmn" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F869117%2Fa462c21b-629f-4b45-95c7-3a51891b5c70.jpeg" alt="sdtslmn profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/sdtslmn" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Sedat SALMAN
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Sedat SALMAN
                
                
              
              &lt;div id="story-author-preview-content-5113155" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/sdtslmn" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F869117%2Fa462c21b-629f-4b45-95c7-3a51891b5c70.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Sedat SALMAN&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/sdtslmn/why-isnt-my-pod-running-5-kubernetes-errors-explained-and-fixed-4aec" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Nov 25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/sdtslmn/why-isnt-my-pod-running-5-kubernetes-errors-explained-and-fixed-4aec" id="article-link-5113155"&gt;
          Why Isn't My Pod Running? 5 Kubernetes Errors Explained and Fixed
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/kubernetes"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;kubernetes&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/devops"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;devops&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/beginners"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;beginners&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/tutorial"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;tutorial&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
            &lt;a href="https://dev.to/sdtslmn/why-isnt-my-pod-running-5-kubernetes-errors-explained-and-fixed-4aec#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              &lt;span class="hidden s:inline"&gt;Add&amp;nbsp;Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            7 min read
          &lt;/small&gt;
          
          &lt;div class="only-sidebar-menu-item trusted-visible-block print-hidden align-center"&gt;
                
                    
                
          &lt;/div&gt;

        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;/div&gt;


&lt;h2&gt;
  
  
  The request path
&lt;/h2&gt;

&lt;p&gt;A request from outside the cluster reaches the &lt;strong&gt;ingress controller&lt;/strong&gt;, which picks an &lt;strong&gt;Ingress rule&lt;/strong&gt; by host and path. The rule points to a &lt;strong&gt;Service&lt;/strong&gt;. A Service doesn't run anything. It's a stable name and address that forwards traffic to the Pods its selector matches, but only the ones that are ready. That list of Pod addresses is the Service's &lt;strong&gt;endpoints&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Inside the cluster, Pods find Services by name through &lt;strong&gt;CoreDNS&lt;/strong&gt;, and &lt;strong&gt;network policies&lt;/strong&gt; decide which Pods may talk to which.&lt;/p&gt;

&lt;p&gt;Each of the five problems below breaks one of those links:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No endpoints&lt;/strong&gt;: the Service's selector matches no Pods, or the targetPort is wrong.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Readiness probe failed&lt;/strong&gt;: the Pods are Running but not ready, so the Service skips them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bad address&lt;/strong&gt;: the Service name doesn't resolve from the caller's namespace.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NetworkPolicy&lt;/strong&gt;: a default-deny policy also blocks DNS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ingress 404&lt;/strong&gt;: no Ingress rule matched the request.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The routine: start in the middle
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;kubectl get endpoints &amp;lt;service&amp;gt;&lt;/code&gt;. No addresses means the Service can't use any Pod: check the selector, then readiness. Addresses but no answer usually means the port.&lt;/li&gt;
&lt;li&gt;Test from a temporary Pod inside the cluster, so you take the Ingress out of the picture:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ kubectl run tmp --image=busybox:1.36 -- sleep 3600
pod/tmp created
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;On Kubernetes 1.33 and later, &lt;code&gt;kubectl get endpoints&lt;/code&gt; prints a deprecation warning. It still works, and &lt;code&gt;kubectl get endpointslice -l kubernetes.io/service-name=&amp;lt;service&amp;gt;&lt;/code&gt; shows the same addresses. &lt;code&gt;kubectl describe service&lt;/code&gt; lists them too.&lt;/p&gt;
&lt;h2&gt;
  
  
  1. No endpoints: the selector, then the targetPort
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;orders&lt;/code&gt; Deployment runs two Pods, both Running and ready. A request to the &lt;code&gt;orders&lt;/code&gt; Service is refused.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ kubectl get pods -l &lt;span class="nv"&gt;app&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;orders
NAME                      READY   STATUS    RESTARTS   AGE
orders-9wh6qsk5sf-4jstr   1/1     Running   0          25s
orders-9wh6qsk5sf-n6vvb   1/1     Running   0          25s

$ kubectl &lt;span class="nb"&gt;exec&lt;/span&gt; tmp -- wget -qO- http://orders
wget: can&lt;span class="s1"&gt;'t connect to remote host (10.97.139.202): Connection refused
command terminated with exit code 1

$ kubectl get endpoints orders
NAME     ENDPOINTS   AGE
orders   &amp;lt;none&amp;gt;      25s
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;No endpoints, so the Service matches no Pods at all. Compare the selector with the Pod labels:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl describe svc orders
Selector:                 app=order
TargetPort:               8080/TCP
Endpoints:                &amp;lt;none&amp;gt;

$ kubectl get pods -l app=orders --show-labels
orders-9wh6qsk5sf-4jstr   1/1     Running   0          25s   app=orders,pod-template-hash=9wh6qsk5sf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The selector says &lt;code&gt;app=order&lt;/code&gt;, the Pods say &lt;code&gt;app=orders&lt;/code&gt;. A selector has to match every label it lists, and one missing letter means zero matches. Fix it:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ kubectl patch svc orders -p \
  &lt;span class="s1"&gt;'{"spec":{"selector":{"app":"orders"}}}'&lt;/span&gt;
service/orders patched
$ kubectl get endpoints orders
orders   10.244.1.4:8080,10.244.2.4:8080   25s
$ kubectl &lt;span class="nb"&gt;exec&lt;/span&gt; tmp -- wget -qO- http://orders
wget: can&lt;span class="s1"&gt;'t connect to remote host (10.97.139.202): Connection refused
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Two endpoints, and still refused. Look at the port: the Service sends traffic to 8080, but the container listens on 5678. Set the targetPort:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ kubectl patch svc orders -p \
  &lt;span class="s1"&gt;'{"spec":{"ports":[{"port":80,"targetPort":5678}]}}'&lt;/span&gt;
service/orders patched
$ kubectl &lt;span class="nb"&gt;exec&lt;/span&gt; tmp -- wget -qO- http://orders
orders ok
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; no endpoints? Check the selector. Endpoints, but refused? Check the targetPort.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/7CkORLGVFWo" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Readiness probe failed: Running, but 0/1 ready
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;web&lt;/code&gt; Deployment has a readiness probe on &lt;code&gt;/ready&lt;/code&gt;. Both Pods are Running, and the Service has no endpoints again. This time the selector is fine.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get pods -l app=web
NAME                   READY   STATUS    RESTARTS   AGE
web-69zgj5p66w-jk4gg   0/1     Running   0          30s
web-69zgj5p66w-mdpdx   0/1     Running   0          30s

$ kubectl get endpoints web
NAME   ENDPOINTS   AGE
web    &amp;lt;none&amp;gt;      30s

$ kubectl exec tmp -- wget -qO- http://web
wget: can't connect to remote host (10.107.126.97): Connection refused

$ kubectl describe pod -l app=web
    Ready:          False
    Readiness:      http-get http://:80/ready delay=0s timeout=1s period=5s #success=1 #failure=3
  Warning  Unhealthy  3s (x6 over 28s)  kubelet  Readiness probe failed: HTTP probe failed with statuscode: 404
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;nginx is running fine. It just has no &lt;code&gt;/ready&lt;/code&gt; page, so every probe gets a 404.&lt;/p&gt;

&lt;p&gt;The difference between the two probes matters here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A failing &lt;strong&gt;liveness&lt;/strong&gt; probe gets the container restarted.&lt;/li&gt;
&lt;li&gt;A failing &lt;strong&gt;readiness&lt;/strong&gt; probe restarts nothing. It keeps the Pod out of every Service that selects it until the probe passes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the Pods sit there, Running and invisible. Point the probe at a page that exists:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ sed -i &lt;span class="s1"&gt;'s#path: /ready#path: /#'&lt;/span&gt; web.yaml
$ kubectl apply -f web.yaml
deployment.apps/web configured
$ kubectl rollout status deployment/web
deployment &lt;span class="s2"&gt;"web"&lt;/span&gt; successfully rolled out
$ kubectl get endpoints web
web    10.244.1.7:80,10.244.2.5:80   34s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; Running but not ready? Read the probe events in &lt;code&gt;describe pod&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/ymK0oBVBMJk" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Bad address: the Service is in another namespace
&lt;/h2&gt;

&lt;p&gt;A Pod in &lt;code&gt;default&lt;/code&gt; calls &lt;code&gt;catalog&lt;/code&gt;, and the name doesn't resolve.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ kubectl &lt;span class="nb"&gt;exec&lt;/span&gt; tmp -- wget -qO- http://catalog
wget: bad address &lt;span class="s1"&gt;'catalog'&lt;/span&gt;
&lt;span class="nb"&gt;command&lt;/span&gt; terminated with &lt;span class="nb"&gt;exit&lt;/span&gt; code 1

$ kubectl get svc -A
NAMESPACE       NAME                       TYPE        CLUSTER-IP       ...
backend         catalog                    ClusterIP   10.107.206.119   ...
default         kubernetes                 ClusterIP   10.96.0.1        ...
ingress-nginx   ingress-nginx-controller   NodePort    10.102.152.188   ...
kube-system     kube-dns                   ClusterIP   10.96.0.10       ...
kube-system     metrics-server             ClusterIP   10.104.46.139    ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;code&gt;catalog&lt;/code&gt; lives in &lt;code&gt;backend&lt;/code&gt;. Now look at how the Pod resolves names:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl exec tmp -- cat /etc/resolv.conf
search default.svc.cluster.local svc.cluster.local cluster.local
nameserver 10.96.0.10
options ndots:5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The search list starts with the Pod's own namespace. So &lt;code&gt;catalog&lt;/code&gt; is looked up as &lt;code&gt;catalog.default.svc.cluster.local&lt;/code&gt;, and that name doesn't exist. Add the namespace, or use the full name:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ kubectl &lt;span class="nb"&gt;exec&lt;/span&gt; tmp -- wget -qO- http://catalog.backend
catalog v1
$ kubectl &lt;span class="nb"&gt;exec&lt;/span&gt; tmp -- wget -qO- \
  http://catalog.backend.svc.cluster.local
catalog v1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If even the full name fails, check CoreDNS itself in &lt;code&gt;kube-system&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; short names only work inside the same namespace. Across namespaces, use &lt;code&gt;service.namespace&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/oWzW9qF186M" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;
&lt;h2&gt;
  
  
  4. NetworkPolicy: default-deny also blocks DNS
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;shop&lt;/code&gt; namespace gets a default-deny policy for ingress and egress, plus two policies that let &lt;code&gt;frontend&lt;/code&gt; reach &lt;code&gt;api&lt;/code&gt; on port 5678, one for each direction. A connection needs the source's egress and the destination's ingress allowed, which is why there are two.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ kubectl apply -f default-deny.yaml -f frontend-api.yaml
networkpolicy.networking.k8s.io/default-deny created
networkpolicy.networking.k8s.io/frontend-to-api created
networkpolicy.networking.k8s.io/api-from-frontend created

$ kubectl get netpol -n shop
NAME                POD-SELECTOR   AGE
api-from-frontend   &lt;span class="nv"&gt;app&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;api        0s
default-deny        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;none&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;         0s
frontend-to-api     &lt;span class="nv"&gt;app&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;frontend   0s

$ kubectl &lt;span class="nb"&gt;exec&lt;/span&gt; -n shop frontend -- wget -qO- http://api
wget: bad address &lt;span class="s1"&gt;'api'&lt;/span&gt;
&lt;span class="nb"&gt;command&lt;/span&gt; terminated with &lt;span class="nb"&gt;exit&lt;/span&gt; code 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Read the error again. A connection the policy blocks usually just times out. &lt;strong&gt;Bad address&lt;/strong&gt; means the DNS lookup failed. Pods ask CoreDNS in &lt;code&gt;kube-system&lt;/code&gt; on port 53, and with all egress denied, that request never leaves the namespace.&lt;/p&gt;

&lt;p&gt;Allow DNS egress for every Pod in the namespace:&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="p"&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="p"&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="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;allow-dns&lt;/span&gt;
  &lt;span class="na"&gt;namespace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;shop&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;podSelector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;policyTypes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"Egress"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="na"&gt;egress&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;namespaceSelector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;matchLabels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;kubernetes.io/metadata.name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kube-system&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;protocol&lt;/span&gt;&lt;span class="p"&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="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;53&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;protocol&lt;/span&gt;&lt;span class="p"&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="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;53&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ kubectl apply -f allow-dns.yaml
networkpolicy.networking.k8s.io/allow-dns created
$ kubectl &lt;span class="nb"&gt;exec&lt;/span&gt; -n shop frontend -- wget -qO- http://api
api-ok

$ kubectl &lt;span class="nb"&gt;exec&lt;/span&gt; -n shop intruder -- wget -qO- -T 2 http://api
wget: download timed out
&lt;span class="nb"&gt;command&lt;/span&gt; terminated with &lt;span class="nb"&gt;exit&lt;/span&gt; code 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;code&gt;frontend&lt;/code&gt; gets through, and the &lt;code&gt;intruder&lt;/code&gt; Pod times out, as it should. One more detail: these policies use the Pod port, 5678, not the Service port 80.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; denied all egress? Allow DNS first.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/5pLuCraaCUY" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;
&lt;h2&gt;
  
  
  5. Ingress 404: class, host and path
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;shop&lt;/code&gt; Ingress routes &lt;code&gt;shop.example.com&lt;/code&gt; to the &lt;code&gt;web&lt;/code&gt; Service. The Service works from inside the cluster, but through the Ingress, nginx says 404.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ kubectl &lt;span class="nb"&gt;exec&lt;/span&gt; tmp -- wget -qO- http://web
storefront

$ curl -s -H &lt;span class="s1"&gt;'Host: shop.example.com'&lt;/span&gt; http://node01:30080/
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;html&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;head&lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;title&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;404 Not Found&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;/title&lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;/head&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That page comes from the ingress controller, not from your app. Requests that match no rule go to the controller's default backend, which answers 404. Check three things, in this order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The class.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get ingress
NAME   CLASS   HOSTS              ADDRESS   PORTS   AGE
shop   ngnix   shop.example.com             80      10s

$ kubectl get ingressclass
NAME    CONTROLLER             PARAMETERS   AGE
nginx   k8s.io/ingress-nginx   &amp;lt;none&amp;gt;       15m
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The Ingress asks for &lt;code&gt;ngnix&lt;/code&gt;, the cluster's class is &lt;code&gt;nginx&lt;/code&gt;, so no controller picks it up. The empty ADDRESS column gives it away. Fix the class:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ kubectl patch ingress shop -p \
  &lt;span class="s1"&gt;'{"spec":{"ingressClassName":"nginx"}}'&lt;/span&gt;
ingress.networking.k8s.io/shop patched
$ kubectl get ingress
NAME   CLASS   HOSTS              ADDRESS         PORTS   AGE
shop   nginx   shop.example.com   192.168.56.11   80      15s

$ curl -s -H &lt;span class="s1"&gt;'Host: shop.example.com'&lt;/span&gt; http://node01:30080/
storefront
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;The host.&lt;/strong&gt; Call the node without the Host header and it's 404 again, because the rule is for &lt;code&gt;shop.example.com&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ curl -s http://node01:30080/
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;404 Not Found&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;The path.&lt;/strong&gt; With &lt;code&gt;pathType: Prefix&lt;/code&gt;, matching works element by element: &lt;code&gt;/api&lt;/code&gt; matches &lt;code&gt;/api/orders&lt;/code&gt;, but not &lt;code&gt;/apis&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A note on the controller: the Ingress NGINX project was retired in March 2026. Existing installs keep working but get no more releases or security fixes. The Ingress API itself is still supported, these three checks work the same with any Ingress controller, and for new setups the Kubernetes project recommends Gateway API.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; Ingress 404? Check the class, the host and the path.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/gu0kvIB5G9k" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;
&lt;h2&gt;
  
  
  All five at once: checkout is down
&lt;/h2&gt;

&lt;p&gt;PodSim's outage lab, S02, puts several of these in one namespace. It's Friday evening and checkout returns 503 through the Ingress. A 503 from nginx is different from a 404: the rule matched, but the Service had no ready Pod to send the request to.&lt;/p&gt;

&lt;p&gt;The same routine finds it. &lt;code&gt;get endpoints&lt;/code&gt; shows none. The Service's selector says &lt;code&gt;app=check-out&lt;/code&gt;, the Pods say &lt;code&gt;app=checkout&lt;/code&gt;. Fix that, and there are still no endpoints, because both Pods are Running but 0/1 ready: the readiness probe checks port 8080 and the app listens on 5678. Fix the probe, wait for the rollout, and checkout answers again.&lt;/p&gt;

&lt;p&gt;There's one more broken Deployment in that lab, for a different reason. That one is yours to find.&lt;/p&gt;
&lt;h2&gt;
  
  
  Cheat sheet
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What you see&lt;/th&gt;
&lt;th&gt;Where to look&lt;/th&gt;
&lt;th&gt;Usual cause&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Refused, no endpoints&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;get endpoints&lt;/code&gt;, &lt;code&gt;describe svc&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Selector doesn't match the Pod labels&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Refused, endpoints exist&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;describe svc&lt;/code&gt;, container port&lt;/td&gt;
&lt;td&gt;targetPort points at the wrong port&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No endpoints, Pods 0/1 ready&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;describe pod&lt;/code&gt;, Events&lt;/td&gt;
&lt;td&gt;Readiness probe failing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;bad address&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;get svc -A&lt;/code&gt;, &lt;code&gt;/etc/resolv.conf&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Service in another namespace, or DNS blocked&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;bad address&lt;/code&gt; with network policies&lt;/td&gt;
&lt;td&gt;&lt;code&gt;get netpol&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Default-deny egress blocks port 53&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Timeout with network policies&lt;/td&gt;
&lt;td&gt;&lt;code&gt;get netpol&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The policy is blocking the connection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;404 from nginx&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;get ingress&lt;/code&gt;, &lt;code&gt;get ingressclass&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Class, host or path doesn't match&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;503 from nginx&lt;/td&gt;
&lt;td&gt;&lt;code&gt;get endpoints&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Rule matched, but no ready Pods&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h2&gt;
  
  
  Try it yourself
&lt;/h2&gt;

&lt;p&gt;Every terminal output above comes from PodSim, a free, open-source Kubernetes training simulator I'm building. It runs in your browser, so there's no cluster to set up, and each lab checks your fix.&lt;/p&gt;

&lt;p&gt;Open &lt;a href="https://sdtslmn.github.io/podsim/" rel="noopener noreferrer"&gt;sdtslmn.github.io/podsim&lt;/a&gt;, go to Labs, and pick:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;I16&lt;/strong&gt; for a Service with no endpoints&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I10&lt;/strong&gt; for readiness and liveness probes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;B12&lt;/strong&gt; for Service DNS names&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A11&lt;/strong&gt; for default-deny network policies&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I18&lt;/strong&gt; for Ingress routing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;S02&lt;/strong&gt; for the checkout outage&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/sdtslmn" rel="noopener noreferrer"&gt;
        sdtslmn
      &lt;/a&gt; / &lt;a href="https://github.com/sdtslmn/podsim" rel="noopener noreferrer"&gt;
        podsim
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      PodSim: Kubernetes training simulator. Practice kubectl on a simulated cluster in the browser or terminal, with guided labs.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;PodSim&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;A Kubernetes training simulator. Practice &lt;code&gt;kubectl&lt;/code&gt; on a simulated cluster, in your terminal or in the browser, along a training path from your first Pod to real-life production scenarios. Every lab checks your work automatically, and a CKAD track with two timed mock exams prepares you for the certification.&lt;/p&gt;

&lt;p&gt;Nothing here runs real containers. The simulator models how Kubernetes objects behave: the scheduler places Pods on nodes, the kubelet pulls images and starts containers, Deployments roll out new ReplicaSets, Services collect endpoints. You see the same states, events and error messages a real cluster gives you, without installing anything or paying for a cluster.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it in the browser:&lt;/strong&gt; &lt;a href="https://sdtslmn.github.io/podsim/" rel="nofollow noopener noreferrer"&gt;https://sdtslmn.github.io/podsim/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/sdtslmn/podsim/docs/images/web-lab.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fsdtslmn%2Fpodsim%2FHEAD%2Fdocs%2Fimages%2Fweb-lab.png" alt="The browser version running the Services lab"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why a simulator&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;Real practice clusters (Killercoda, KodeKloud, kind, minikube) are great once you know the basics. For a first contact they are often too much: you wait for VMs, things break in ways that have nothing to do…&lt;/p&gt;&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/sdtslmn/podsim" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;h2&gt;
  
  
  Keep going
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Part 1:&lt;/strong&gt; &lt;a href="https://dev.to/sdtslmn/why-isnt-my-pod-running-5-kubernetes-errors-explained-and-fixed-4aec"&gt;Why isn't my Pod running? 5 Kubernetes errors explained and fixed&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shorts from this post:&lt;/strong&gt; &lt;a href="https://www.youtube.com/shorts/7CkORLGVFWo" rel="noopener noreferrer"&gt;Service has no endpoints&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/ymK0oBVBMJk" rel="noopener noreferrer"&gt;readiness probe failed&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/oWzW9qF186M" rel="noopener noreferrer"&gt;Service DNS not resolving&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/5pLuCraaCUY" rel="noopener noreferrer"&gt;NetworkPolicy blocking traffic&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/gu0kvIB5G9k" rel="noopener noreferrer"&gt;Ingress 404&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Get the next one:&lt;/strong&gt; a new one-minute Kubernetes fix goes out most days on &lt;a href="https://www.youtube.com/@KubernetesInaMinute?sub_confirmation=1" rel="noopener noreferrer"&gt;Kubernetes in a Minute&lt;/a&gt;. I also run &lt;a href="https://www.youtube.com/@AWSCloudInAMinute" rel="noopener noreferrer"&gt;AWS Cloud in a Minute&lt;/a&gt; and &lt;a href="https://www.youtube.com/@AzureCloudInAMinute" rel="noopener noreferrer"&gt;Azure Cloud in a Minute&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="noopener noreferrer"&gt;Service&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/tasks/debug/debug-application/debug-service/" rel="noopener noreferrer"&gt;Debug Services&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/probes/" rel="noopener noreferrer"&gt;Liveness, Readiness, and Startup Probes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/" rel="noopener noreferrer"&gt;DNS for Services and Pods&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/concepts/services-networking/network-policies/" rel="noopener noreferrer"&gt;Network Policies&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="noopener noreferrer"&gt;Ingress&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/blog/2025/04/24/endpoints-deprecation/" rel="noopener noreferrer"&gt;Kubernetes v1.33: Continuing the transition from Endpoints to EndpointSlices&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/" rel="noopener noreferrer"&gt;Ingress NGINX Retirement: What You Need to Know&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Questions, or a network problem you keep running into? Leave a comment.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Kubernetes® is a registered trademark of The Linux Foundation. This post is independent and not affiliated with or endorsed by The Linux Foundation or the CNCF.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>networking</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Azure Private Endpoint Not Working? 8 Causes, and Most Are DNS</title>
      <dc:creator>Sedat SALMAN</dc:creator>
      <pubDate>Fri, 27 Nov 2026 13:00:00 +0000</pubDate>
      <link>https://dev.to/sdtslmn/azure-private-endpoint-not-working-8-causes-and-most-are-dns-4f29</link>
      <guid>https://dev.to/sdtslmn/azure-private-endpoint-not-working-8-causes-and-most-are-dns-4f29</guid>
      <description>&lt;p&gt;&lt;em&gt;Prefer video? The full walkthrough is at the top of this post, and the most common cases have one-minute Shorts right where they come up. This guide first went out on the &lt;a href="https://azurecloudinaminute.substack.com/subscribe" rel="noopener noreferrer"&gt;Azure Cloud in a Minute newsletter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The one-minute answer
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The problem:&lt;/strong&gt; you created a private endpoint, but your app still connects to the public IP, or can’t connect at all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The cause:&lt;/strong&gt; usually DNS. The endpoint has a private IP, but your app finds the service by its name, and that name keeps resolving to the public address until a private DNS zone answers for it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fix:&lt;/strong&gt; link the right private DNS zone (for Blob Storage, &lt;code&gt;privatelink.blob.core.windows.net&lt;/code&gt;) to every VNet that does the lookup. If you run your own DNS servers, forward to Azure DNS at &lt;code&gt;168.63.129.16&lt;/code&gt;. For on-premises, add a conditional forwarder that sends the lookup to a resolver in Azure. Then run &lt;code&gt;nslookup&lt;/code&gt;: you want the private IP back.&lt;/p&gt;

&lt;p&gt;The rest of this guide explains why, goes through the causes one by one, and ends with a checklist you can work through.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a private endpoint actually is
&lt;/h2&gt;

&lt;p&gt;A private endpoint is a network interface in your subnet, with a private IP address, that connects to one specific resource through Azure Private Link. That IP stays the same for the whole life of the endpoint.&lt;/p&gt;

&lt;p&gt;Three details matter later in this guide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It connects to one sub-resource, not the whole service.&lt;/strong&gt; A storage account needs a separate endpoint for &lt;code&gt;blob&lt;/code&gt;, &lt;code&gt;file&lt;/code&gt;, &lt;code&gt;dfs&lt;/code&gt; and so on.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It lives in the same region and subscription as its VNet.&lt;/strong&gt; The resource it points to can be in another region.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If you don’t have approval rights on the resource, the connection starts as Pending&lt;/strong&gt; until the resource owner approves it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;It’s not the same as a service endpoint.&lt;/strong&gt; A service endpoint is a setting on your subnet. Traffic takes the Azure backbone and the storage firewall can allow that subnet, but the name still resolves to a public IP and on-premises clients can’t use it. A private endpoint gives the service a private IP inside your network. It works from peered VNets and from on-premises over VPN or ExpressRoute, and it lets you switch public access off. The trade-off: private endpoints are billed per hour and per GB, and they need DNS work.&lt;/p&gt;

&lt;p&gt;This difference is the most watched Short on the channel:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/QpYOiyxEAKk" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4cji76tki16lljdmucir.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4cji76tki16lljdmucir.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it fails: the name still points to the public IP
&lt;/h2&gt;

&lt;p&gt;Creating a private endpoint doesn’t change your app’s connection string. Azure changes the public DNS record instead, and whether you get the private IP depends on who answers the next step.&lt;/p&gt;

&lt;p&gt;Here is what happens for a storage account called &lt;code&gt;mystore&lt;/code&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Your app looks up &lt;code&gt;mystore.blob.core.windows.net&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Public DNS answers with a CNAME: &lt;code&gt;mystore.privatelink.blob.core.windows.net&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If the lookup comes from a VNet linked to the private DNS zone &lt;code&gt;privatelink.blob.core.windows.net&lt;/code&gt;, that zone answers with an A record: the private endpoint’s IP.&lt;/li&gt;
&lt;li&gt;If not, the lookup carries on through public DNS and returns the storage service’s public IP.&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;From a VNet linked to the private DNS zone:&lt;/strong&gt; &lt;code&gt;mystore.privatelink.blob.core.windows.net&lt;/code&gt; is an A record with the private IP, for example &lt;code&gt;10.1.1.5&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;From anywhere else:&lt;/strong&gt; it points on to the storage service’s public endpoint and public IP.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So a private endpoint that “doesn’t work” is usually fine. The client just never asks the private zone. Azure-provided DNS at &lt;code&gt;168.63.129.16&lt;/code&gt; is what reads the private zones linked to a VNet, so every lookup has to end up there, coming from a linked VNet.&lt;/p&gt;

&lt;p&gt;The whole idea in under a minute:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/fU6L7gjJTjs" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F77ju43aot69kkgwj0ha6.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F77ju43aot69kkgwj0ha6.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The causes, one by one
&lt;/h2&gt;

&lt;p&gt;Work through these in order. The first four are all about where the lookup goes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fny1knfe65rrfqccoqcb5.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fny1knfe65rrfqccoqcb5.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The private DNS zone isn’t linked to the VNet doing the lookup
&lt;/h3&gt;

&lt;p&gt;When you create the endpoint in the portal with private DNS integration, Azure creates the zone, adds the A record, and links the zone to the endpoint’s own VNet. A client in any other VNet still gets the public IP.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; open the zone (&lt;code&gt;privatelink.blob.core.windows.net&lt;/code&gt;), go to &lt;strong&gt;Virtual network links&lt;/strong&gt;, and add a link for every VNet that has clients. Keep one zone and link it many times. Several zones with the same name need manual work to keep their records in step.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Hub and spoke: the zone is linked to the hub only
&lt;/h3&gt;

&lt;p&gt;The endpoint sits in a spoke or the hub, the zone is linked to the hub, and a VM in another spoke resolves the public IP.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; either link the same zone to every spoke and hub VNet that has clients, or point the spokes’ DNS servers at a resolver in the hub (a DNS forwarder or an Azure DNS Private Resolver inbound endpoint) so every lookup starts from the linked hub.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Your own DNS servers don’t forward to Azure DNS
&lt;/h3&gt;

&lt;p&gt;If the VNet uses custom DNS servers, such as domain controllers, they answer the lookup instead of Azure DNS, and they know nothing about private zones.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; give those servers a forwarder to &lt;code&gt;168.63.129.16&lt;/code&gt;, and link the VNet they sit in to the private DNS zone. Microsoft’s rule is that DNS queries for private endpoints must come from a VNet linked to the zone.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. On-premises can’t see the private zone
&lt;/h3&gt;

&lt;p&gt;On-premises DNS servers can’t read Azure private DNS zones, so a laptop in the office gets the public IP even over VPN or ExpressRoute.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; add a conditional forwarder on your on-premises DNS that sends the lookup to a resolver in Azure: an Azure DNS Private Resolver inbound endpoint, or a DNS forwarder VM in a linked VNet. Forward the public zone name, &lt;code&gt;blob.core.windows.net&lt;/code&gt;, not &lt;code&gt;privatelink.blob.core.windows.net&lt;/code&gt;. Microsoft’s guidance is explicit that the conditional forwarding must point at the public DNS zone forwarder.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/-iBl5Hr3SbU" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  5. The wrong sub-resource, or a missing one
&lt;/h3&gt;

&lt;p&gt;One endpoint covers one sub-resource. An endpoint for &lt;code&gt;blob&lt;/code&gt; doesn’t help a file share or a Data Lake call, and each sub-resource has its own zone (&lt;code&gt;privatelink.file.core.windows.net&lt;/code&gt;, &lt;code&gt;privatelink.dfs.core.windows.net&lt;/code&gt; and so on).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; create an endpoint per sub-resource you use. For Data Lake Storage, create both &lt;code&gt;dfs&lt;/code&gt; and &lt;code&gt;blob&lt;/code&gt;: some Data Lake operations get redirected to the Blob endpoint, and directory and ACL operations need the &lt;code&gt;dfs&lt;/code&gt; one. Don’t put records for different services in the same zone.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. A partner’s storage account now returns NXDOMAIN
&lt;/h3&gt;

&lt;p&gt;Once your network uses &lt;code&gt;privatelink.blob.core.windows.net&lt;/code&gt;, your zone answers for every storage account that has a private endpoint, including accounts in other tenants. Your zone has no record for theirs, so the answer is NXDOMAIN (name doesn’t exist).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; enable &lt;strong&gt;Fallback to internet&lt;/strong&gt; on the zone’s virtual network link (resolution policy &lt;code&gt;NxDomainRedirect&lt;/code&gt;). When the private name isn’t found, Azure retries the public name instead of failing.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/9_CpsyzuaTo" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Your NSG or firewall route doesn’t apply to the endpoint
&lt;/h3&gt;

&lt;p&gt;By default, network policies are disabled for private endpoints, so NSG rules and route tables on the subnet don’t affect traffic to them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; on the endpoint’s subnet, turn on &lt;strong&gt;Network policy for private endpoints&lt;/strong&gt; for network security groups, route tables, or both. To send endpoint traffic through a firewall, the route must be at least as specific as the VNet’s address space. A &lt;code&gt;0.0.0.0/0&lt;/code&gt; route won’t override the &lt;code&gt;/32&lt;/code&gt; route the endpoint adds.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. The connection is still Pending
&lt;/h3&gt;

&lt;p&gt;If the resource belongs to someone else and you requested access, the connection stays &lt;strong&gt;Pending&lt;/strong&gt; until the resource owner approves it. Nothing resolves or connects until then.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; check the connection state on the private endpoint, and ask the owner to approve it.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to check it
&lt;/h2&gt;

&lt;p&gt;Test from where the app actually runs, not from your own laptop. A lookup from the wrong network proves nothing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Look up the name.&lt;/strong&gt; On Windows or Linux:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nslookup mystore.blob.core.windows.net
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is what a working private endpoint looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Name:    mystore.privatelink.blob.core.windows.net
Address: 10.1.1.5
Aliases: mystore.blob.core.windows.net
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A public IP in the &lt;code&gt;Address&lt;/code&gt; line means the lookup never reached the private zone. Go back to causes 1 to 4.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Test the connection.&lt;/strong&gt; In PowerShell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="nc"&gt;Test&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;NetConnection&lt;/span&gt; &lt;span class="n"&gt;mystore&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;blob&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;core&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;windows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Port&lt;/span&gt; &lt;span class="mi"&gt;443&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You want &lt;code&gt;RemoteAddress&lt;/code&gt; to be the private IP and &lt;code&gt;TcpTestSucceeded : True&lt;/code&gt;. The right IP with a failed test points to an NSG, a route or a firewall (cause 7), or a Pending connection (cause 8).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Check the portal.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Private endpoint, DNS configuration:&lt;/strong&gt; shows the name, the private IP and the zone it registered in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Private DNS zone, Recordsets:&lt;/strong&gt; the A record for &lt;code&gt;mystore&lt;/code&gt; with that IP.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Private DNS zone, Virtual network links:&lt;/strong&gt; every VNet with clients is listed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Virtual network, DNS servers:&lt;/strong&gt; “Default (Azure-provided)” or custom servers. If custom, check their forwarders (cause 3).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Rule out the client.&lt;/strong&gt; A stale DNS cache or an old entry in the hosts file can return the public IP long after you’ve fixed DNS. On Windows, &lt;code&gt;ipconfig /flushdns&lt;/code&gt; clears the cache.&lt;/p&gt;

&lt;h2&gt;
  
  
  Then lock it down
&lt;/h2&gt;

&lt;p&gt;A private endpoint doesn’t close the public door. Creating it leaves the public endpoint open, so anyone who could reach the service before still can.&lt;/p&gt;

&lt;p&gt;Once every client resolves the private IP and connects, turn public access off. For a storage account: &lt;strong&gt;Security + networking&lt;/strong&gt; → &lt;strong&gt;Networking&lt;/strong&gt; → &lt;strong&gt;Manage&lt;/strong&gt;, then &lt;strong&gt;Disable&lt;/strong&gt;. Traffic from the endpoint’s VNet keeps working with public access disabled, and you don’t need a firewall rule for it. Key Vault and Azure SQL have a similar switch. On Key Vault, trusted Microsoft services can still get through when public access is off.&lt;/p&gt;

&lt;p&gt;Do it in that order. Switch public access off first and every client that still resolves the public IP breaks at once.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;One private endpoint per sub-resource you use (&lt;code&gt;blob&lt;/code&gt;, &lt;code&gt;file&lt;/code&gt;, &lt;code&gt;dfs&lt;/code&gt;...), and both &lt;code&gt;dfs&lt;/code&gt; and &lt;code&gt;blob&lt;/code&gt; for Data Lake.&lt;/li&gt;
&lt;li&gt;Connection state is &lt;strong&gt;Approved&lt;/strong&gt;, not Pending.&lt;/li&gt;
&lt;li&gt;One private DNS zone per sub-resource, with the recommended &lt;code&gt;privatelink&lt;/code&gt; name.&lt;/li&gt;
&lt;li&gt;That zone is linked to every VNet whose clients do the lookup, or the spokes use a resolver in a linked hub.&lt;/li&gt;
&lt;li&gt;Custom DNS servers forward to &lt;code&gt;168.63.129.16&lt;/code&gt; and sit in a linked VNet.&lt;/li&gt;
&lt;li&gt;On-premises DNS has a conditional forwarder for the public zone (&lt;code&gt;blob.core.windows.net&lt;/code&gt;) pointing at a resolver in Azure.&lt;/li&gt;
&lt;li&gt;Fallback to internet is on if you also reach other organisations’ storage accounts.&lt;/li&gt;
&lt;li&gt;Network policies are enabled on the endpoint’s subnet if you rely on NSGs or a firewall route.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;nslookup&lt;/code&gt; from where the app runs returns the private IP, and port 443 connects.&lt;/li&gt;
&lt;li&gt;Public network access is disabled, last.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  From the field
&lt;/h2&gt;

&lt;p&gt;A lot of my Azure work is with industrial sites, where plant networks reach Azure over private connections and nothing is allowed out to the internet. There, private endpoints aren’t a nice extra, they’re the only way in, and DNS is where projects lose days. My rule is to design name resolution before the first endpoint exists: the &lt;code&gt;privatelink&lt;/code&gt; zones owned in one central place, linked to the hub, and a resolver in the hub that on-premises DNS forwards to. After that, each new service only needs its endpoint and its record. And I always test from a machine inside the plant network, never from my own laptop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep going
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Related guides:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://azurecloudinaminute.substack.com/p/key-vault-403-forbidden" rel="noopener noreferrer"&gt;Azure Key Vault 403 Forbidden: 12 causes and how to find yours&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://azurecloudinaminute.substack.com/p/azure-vm-cant-connect" rel="noopener noreferrer"&gt;Azure VM can't connect&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://azurecloudinaminute.substack.com/p/azure-in-60-seconds-landing-zones" rel="noopener noreferrer"&gt;Landing zones when the workload can't touch the internet&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Shorts from this guide:&lt;/strong&gt; &lt;a href="https://www.youtube.com/shorts/QpYOiyxEAKk" rel="noopener noreferrer"&gt;service endpoint vs private endpoint&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/fU6L7gjJTjs" rel="noopener noreferrer"&gt;still using the public IP&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/-iBl5Hr3SbU" rel="noopener noreferrer"&gt;works in Azure but not from the office&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/9_CpsyzuaTo" rel="noopener noreferrer"&gt;partner storage returns NXDOMAIN&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get the next one:&lt;/strong&gt; new guides go out first on the &lt;a href="https://azurecloudinaminute.substack.com/subscribe" rel="noopener noreferrer"&gt;Azure Cloud in a Minute newsletter&lt;/a&gt;, with a long video and Shorts on &lt;a href="https://www.youtube.com/@AzureCloudInAMinute?sub_confirmation=1" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;. I also run &lt;a href="https://www.youtube.com/@AWSCloudInAMinute" rel="noopener noreferrer"&gt;AWS Cloud in a Minute&lt;/a&gt; and &lt;a href="https://www.youtube.com/@KubernetesInaMinute" rel="noopener noreferrer"&gt;Kubernetes in a Minute&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;p&gt;All from Microsoft Learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-overview" rel="noopener noreferrer"&gt;What is a private endpoint?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-dns" rel="noopener noreferrer"&gt;Azure private endpoint DNS configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-dns-integration" rel="noopener noreferrer"&gt;Azure private endpoint DNS integration scenarios&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/storage/common/storage-private-endpoints" rel="noopener noreferrer"&gt;Use private endpoints for Azure Storage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/private-link/disable-private-endpoint-network-policy" rel="noopener noreferrer"&gt;Manage network policies for private endpoints&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/azure/dns/private-dns-fallback" rel="noopener noreferrer"&gt;Fallback to internet for Azure Private DNS zones&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/azure/virtual-network/what-is-ip-address-168-63-129-16" rel="noopener noreferrer"&gt;What is IP address 168.63.129.16?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Independent writer, not affiliated with or endorsed by Microsoft.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>azure</category>
      <category>networking</category>
      <category>dns</category>
      <category>cloud</category>
    </item>
    <item>
      <title>S3 Access Denied With an IAM Allow? 11 Causes and How to Find Yours</title>
      <dc:creator>Sedat SALMAN</dc:creator>
      <pubDate>Thu, 26 Nov 2026 13:00:00 +0000</pubDate>
      <link>https://dev.to/aws-builders/s3-access-denied-with-an-iam-allow-11-causes-and-how-to-find-yours-3gc3</link>
      <guid>https://dev.to/aws-builders/s3-access-denied-with-an-iam-allow-11-causes-and-how-to-find-yours-3gc3</guid>
      <description>&lt;p&gt;&lt;em&gt;Prefer video? The full walkthrough is at the top of this post, and the most common cases have one-minute Shorts right where they come up. This guide first went out on the &lt;a href="https://awscloudinaminute.substack.com/subscribe" rel="noopener noreferrer"&gt;AWS Cloud in a Minute newsletter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The one-minute answer
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The problem:&lt;/strong&gt; your IAM policy looks right, and S3 still returns &lt;code&gt;403 Access Denied&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How S3 decides:&lt;/strong&gt; an explicit Deny anywhere beats every Allow, and without at least one Allow the answer is no. “Anywhere” is much more than your IAM policy: the bucket policy, SCPs and RCPs in AWS Organizations, permissions boundaries, session policies, VPC endpoint policies, Block Public Access and KMS key policies all get a say.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where to look first:&lt;/strong&gt; read the full error message. For requests in the same account or organization it names the type of policy, and says either &lt;code&gt;explicit deny&lt;/code&gt; or &lt;code&gt;no ... policy allows&lt;/code&gt;. That tells you which of the causes below to check.&lt;/p&gt;

&lt;p&gt;The rest of this guide goes through the causes one by one, in the order worth checking, and ends with a checklist.&lt;/p&gt;

&lt;p&gt;The same three checks, in under a minute:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/CvNhis8Tu9E" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  How S3 decides
&lt;/h2&gt;

&lt;p&gt;Every request starts as denied. AWS then looks at every policy that applies and follows three rules:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;An explicit Deny in any policy wins.&lt;/strong&gt; Nothing overrides it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Otherwise the request needs an Allow.&lt;/strong&gt; No Allow anywhere means an implicit deny.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Some policies only set a ceiling.&lt;/strong&gt; SCPs, RCPs, permissions boundaries and session policies never grant anything. They have to allow the action as well, or it’s denied. One exception in the same account: a bucket policy that names your IAM user or your exact role session ARN isn’t held back by a missing Allow in a boundary or session policy. An explicit Deny still wins.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Where the bucket lives changes rule 2:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Same account:&lt;/strong&gt; an Allow in either your IAM policy or the bucket policy is enough.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Another account:&lt;/strong&gt; both have to allow it. Your IAM policy in your account, and the bucket policy in theirs. If the object is encrypted with their KMS key, the key policy has to allow you too.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn30p1kh0e84aos0lfwwp.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn30p1kh0e84aos0lfwwp.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Read the error first
&lt;/h2&gt;

&lt;p&gt;Most S3 Access Denied messages follow one pattern, and the last part is the clue:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User arn:aws:sts::111122223333:assumed-role/app-role/session is not authorized to perform s3:GetObject on "arn:aws:s3:::my-bucket/report.csv" because no identity-based policy allows the s3:GetObject action
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It ends in one of two ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;with an explicit deny in a ... policy&lt;/code&gt;: something says Deny. Find that statement. For SCPs, RCPs, identity-based policies, session policies and permissions boundaries, the message includes the ARN of the policy that denied you.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;because no ... policy allows the ... action&lt;/code&gt;: nothing says Allow. An Allow is missing in the type of policy it names.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The type tells you where to look: &lt;code&gt;identity-based&lt;/code&gt;, &lt;code&gt;resource-based&lt;/code&gt; (the bucket policy), &lt;code&gt;service control policy&lt;/code&gt;, &lt;code&gt;resource control policy&lt;/code&gt;, &lt;code&gt;permissions boundary&lt;/code&gt;, &lt;code&gt;session policy&lt;/code&gt; or &lt;code&gt;VPC endpoint policy&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You only get a plain &lt;code&gt;Access Denied&lt;/code&gt; with no detail for cross-account requests outside your organization and for directory buckets, and AWS notes the detail can also be missing when a VPC endpoint policy is what blocked you. The same context is recorded in CloudTrail.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flgm3cghupmb215cdfoco.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flgm3cghupmb215cdfoco.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The causes, one by one
&lt;/h2&gt;

&lt;p&gt;Check them in this order. The first three explain an explicit deny, the next two explain most implicit ones.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feua5d5l4xf173nyqhwl6.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feua5d5l4xf173nyqhwl6.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Something says Deny
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. A Deny in the bucket policy.&lt;/strong&gt; Bucket policies often deny everything that doesn’t meet a condition, such as &lt;code&gt;aws:SourceVpce&lt;/code&gt; (only through one VPC endpoint) or &lt;code&gt;aws:SourceVpc&lt;/code&gt; (only from one VPC). Your IAM Allow can’t beat that, and a Deny in a bucket policy applies to every object in the bucket, whoever owns it. A common surprise: a policy like this also blocks the S3 console, because console requests don’t come from your VPC endpoint.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; find the Deny statement and the condition your request fails, then send the request the expected way or add an exception for your role.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. An SCP or RCP in AWS Organizations.&lt;/strong&gt; Service control policies limit what your account’s identities can do. Resource control policies limit what can be done to resources, S3 buckets and customer managed KMS keys included (not AWS managed keys). Neither grants anything, and the message names the one that blocked you. RCPs don’t apply to resources in the management account.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; you usually can’t change these yourself. Send the policy ARN from the error to whoever runs your organization.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. A permissions boundary or session policy.&lt;/strong&gt; Both set a ceiling. With a boundary, your role can do only what both its policies and its boundary allow. A session policy, passed when the role is assumed, limits that session the same way.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; add the S3 action to the boundary or session policy, not only to the role.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fihknhpgrodkpj2hlbt9l.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fihknhpgrodkpj2hlbt9l.jpeg" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Your Allow doesn’t match the request
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;4. The policy points at the wrong ARN.&lt;/strong&gt; &lt;code&gt;s3:ListBucket&lt;/code&gt; works on the bucket. &lt;code&gt;s3:GetObject&lt;/code&gt; and &lt;code&gt;s3:PutObject&lt;/code&gt; work on the objects inside it. Mix them up and the Allow never matches.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"Version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2012-10-17"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"Statement"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"Effect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Allow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"Action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"s3:ListBucket"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"Resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"arn:aws:s3:::my-bucket"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"Effect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Allow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"Action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"s3:GetObject"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"s3:PutObject"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"Resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"arn:aws:s3:::my-bucket/*"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5. The object doesn’t exist.&lt;/strong&gt; If you don’t have &lt;code&gt;s3:ListBucket&lt;/code&gt;, S3 answers a request for a missing key with &lt;code&gt;403 Access Denied&lt;/code&gt;, not &lt;code&gt;404 Not Found&lt;/code&gt;. A typo in the key, the wrong prefix or the wrong case looks exactly like a permissions problem.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; check the key, or grant &lt;code&gt;s3:ListBucket&lt;/code&gt; so missing objects return 404.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/yESzOJ9rzPM" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Encryption
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;6. The object is encrypted with a KMS key you can’t use.&lt;/strong&gt; With SSE-KMS and a customer managed key, uploads need &lt;code&gt;kms:GenerateDataKey&lt;/code&gt;, and downloads and multipart uploads need &lt;code&gt;kms:Decrypt&lt;/code&gt;. The CLI switches to multipart for large files, so a role with only &lt;code&gt;kms:GenerateDataKey&lt;/code&gt; can upload small files and fail on big ones. The key policy has to allow you as well as your IAM policy. With the AWS managed key (&lt;code&gt;aws/s3&lt;/code&gt;), only principals in the key’s own account can use it, so objects encrypted with it can’t be shared with another account.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; add the KMS permission on that key, and check its key policy. To share encrypted objects across accounts, use a customer managed key.&lt;/p&gt;

&lt;p&gt;This one is the most watched Short on the channel, so here it is in under a minute:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/elM22YEyNQA" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Another account is involved
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;7. Only one side allows it.&lt;/strong&gt; Cross-account access needs an Allow in your IAM policy and in their bucket policy. With a customer managed KMS key, the same goes for the key: their key policy and your IAM policy. Outside your organization you also only get a plain Access Denied, so check both sides.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. The object belongs to another account.&lt;/strong&gt; If the bucket still uses ACLs (Object Ownership set to Object writer, or Bucket owner preferred without the &lt;code&gt;bucket-owner-full-control&lt;/code&gt; ACL on upload), an object uploaded by another account is owned by that account. A bucket policy Allow only covers objects the bucket owner owns, so the bucket owner’s own users can be denied.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; move any ACL permissions into the bucket policy, then set Object Ownership to &lt;strong&gt;Bucket owner enforced&lt;/strong&gt; (the default for new buckets). That turns ACLs off and makes the bucket owner own every object.&lt;/p&gt;

&lt;h3&gt;
  
  
  Network and public access
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;9. Block Public Access.&lt;/strong&gt; It overrides bucket policies and ACLs that grant public access, and it’s on by default for new buckets. If your bucket policy counts as public, the &lt;code&gt;RestrictPublicBuckets&lt;/code&gt; setting also blocks cross-account requests, not only anonymous ones. When the settings differ, S3 applies the most restrictive combination across the organization, account, bucket and access point levels.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10. The VPC endpoint policy.&lt;/strong&gt; A request through an S3 VPC endpoint is also checked against the endpoint’s policy. The default allows everything, but a custom policy that lists only certain buckets blocks the rest, often with no detail in the error.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fix:&lt;/em&gt; add the bucket to the endpoint policy, or test from outside the VPC to confirm.&lt;/p&gt;

&lt;h3&gt;
  
  
  Billing
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;11. Requester Pays.&lt;/strong&gt; If the bucket owner enabled Requester Pays, requests from other accounts have to say they’ll pay. In the CLI, add &lt;code&gt;--request-payer requester&lt;/code&gt;. In an SDK, set the &lt;code&gt;x-amz-request-payer&lt;/code&gt; header to &lt;code&gt;requester&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to check it
&lt;/h2&gt;

&lt;p&gt;Run these from the same place as the failing app, with the same credentials.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Confirm who you are.&lt;/strong&gt; The request often runs as a different role than the one you edited:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws sts get-caller-identity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Read the full error.&lt;/strong&gt; The CLI prints it as is. In an SDK, log the exception message, not only the status code. CloudTrail records the same context, so you can also find the failed call there and read its error message.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Look at the object and the bucket.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3api head-object --bucket my-bucket --key report.csv
aws s3api get-bucket-policy --bucket my-bucket
aws s3api get-bucket-ownership-controls --bucket my-bucket
aws s3api get-public-access-block --bucket my-bucket
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;head-object&lt;/code&gt; shows whether the object exists and which KMS key encrypts it (&lt;code&gt;ServerSideEncryption&lt;/code&gt; and &lt;code&gt;SSEKMSKeyId&lt;/code&gt;). The other three cover causes 1, 8 and 9.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Test the policy.&lt;/strong&gt; The IAM policy simulator shows whether your policies allow an action on a given ARN, and which statement decides it. You can add the bucket policy to the test too. It doesn’t cover RCPs, and results can differ from real requests when a VPC endpoint policy is involved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Still stuck?&lt;/strong&gt; Note the S3 request ID from the failed response and open a case with AWS Support.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;aws sts get-caller-identity&lt;/code&gt; shows the role you expect.&lt;/li&gt;
&lt;li&gt;The full error message says explicit deny or no policy allows, and names the policy type.&lt;/li&gt;
&lt;li&gt;No Deny in the bucket policy matches your request, including conditions like &lt;code&gt;aws:SourceVpce&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;No SCP, RCP, permissions boundary or session policy blocks the action.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;s3:ListBucket&lt;/code&gt; is on &lt;code&gt;arn:aws:s3:::my-bucket&lt;/code&gt;, object actions on &lt;code&gt;arn:aws:s3:::my-bucket/*&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The key exists (or you have &lt;code&gt;s3:ListBucket&lt;/code&gt;, so a missing key shows 404).&lt;/li&gt;
&lt;li&gt;For SSE-KMS: &lt;code&gt;kms:GenerateDataKey&lt;/code&gt; to write, &lt;code&gt;kms:Decrypt&lt;/code&gt; to read and for multipart uploads, and the key policy allows you.&lt;/li&gt;
&lt;li&gt;Cross-account: both your IAM policy and their bucket policy allow it, and the KMS key is customer managed.&lt;/li&gt;
&lt;li&gt;Object Ownership is Bucket owner enforced.&lt;/li&gt;
&lt;li&gt;Block Public Access and the VPC endpoint policy aren’t the blocker.&lt;/li&gt;
&lt;li&gt;Requester Pays buckets get &lt;code&gt;--request-payer requester&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  From the field
&lt;/h2&gt;

&lt;p&gt;Much of my AWS work is multi-account: data platforms that collect from hundreds of sites into central buckets, and products moved over from Azure. The Access Denied errors that took longest to solve were rarely in the IAM policy everyone was staring at. They were in the bucket policy in the other account, in the KMS key policy, or in an SCP nobody on the team knew existed. So before I touch any policy now, I run &lt;code&gt;aws sts get-caller-identity&lt;/code&gt; and read the full error message. Those two steps usually point straight at the right account and the right policy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep going
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Related guides:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://awscloudinaminute.substack.com/p/assumerole-access-denied" rel="noopener noreferrer"&gt;AssumeRole Access Denied: every cause and how to find yours&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://awscloudinaminute.substack.com/p/nat-gateway-vs-vpc-endpoints" rel="noopener noreferrer"&gt;NAT gateway vs VPC endpoints: why your private subnet can't reach S3, or costs too much&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://awscloudinaminute.substack.com/p/secrets-manager-vs-parameter-store" rel="noopener noreferrer"&gt;Secrets Manager vs Parameter Store vs KMS: which one to use&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/shorts/_LI8daD6Fyg" rel="noopener noreferrer"&gt;Short: IAM user vs IAM role, why your app shouldn't have access keys&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Shorts from this guide:&lt;/strong&gt; &lt;a href="https://www.youtube.com/shorts/CvNhis8Tu9E" rel="noopener noreferrer"&gt;IAM says Allow, S3 says Access Denied&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/yESzOJ9rzPM" rel="noopener noreferrer"&gt;403 for a file that doesn't exist&lt;/a&gt;, &lt;a href="https://www.youtube.com/shorts/elM22YEyNQA" rel="noopener noreferrer"&gt;small uploads work, big ones fail&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get the next one:&lt;/strong&gt; new guides go out first on the &lt;a href="https://awscloudinaminute.substack.com/subscribe" rel="noopener noreferrer"&gt;AWS Cloud in a Minute newsletter&lt;/a&gt;, with a long video and Shorts on &lt;a href="https://www.youtube.com/@AWSCloudInAMinute?sub_confirmation=1" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;. I also run &lt;a href="https://www.youtube.com/@AzureCloudInAMinute" rel="noopener noreferrer"&gt;Azure Cloud in a Minute&lt;/a&gt; and &lt;a href="https://www.youtube.com/@KubernetesInaMinute" rel="noopener noreferrer"&gt;Kubernetes in a Minute&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;p&gt;All from the AWS documentation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/troubleshoot-403-errors.html" rel="noopener noreferrer"&gt;Troubleshoot access denied (403 Forbidden) errors in Amazon S3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html" rel="noopener noreferrer"&gt;GetObject: permissions and missing objects&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html" rel="noopener noreferrer"&gt;Policy evaluation logic&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic-cross-account.html" rel="noopener noreferrer"&gt;Cross-account policy evaluation logic&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html" rel="noopener noreferrer"&gt;Policies and permissions in IAM (session policies, permissions boundaries)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html" rel="noopener noreferrer"&gt;Resource control policies (RCPs)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-modifying-external-accounts.html" rel="noopener noreferrer"&gt;Allowing users in other accounts to use a KMS key&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-bucket-policies-vpc-endpoint.html" rel="noopener noreferrer"&gt;Controlling access from VPC endpoints with bucket policies&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-policies-s3.html" rel="noopener noreferrer"&gt;Examples of Amazon S3 identity-based policies&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Independent writer, not affiliated with or endorsed by Amazon Web Services.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>s3</category>
      <category>security</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Why Isn't My Pod Running? 5 Kubernetes Errors Explained and Fixed</title>
      <dc:creator>Sedat SALMAN</dc:creator>
      <pubDate>Wed, 25 Nov 2026 04:40:42 +0000</pubDate>
      <link>https://dev.to/sdtslmn/why-isnt-my-pod-running-5-kubernetes-errors-explained-and-fixed-4aec</link>
      <guid>https://dev.to/sdtslmn/why-isnt-my-pod-running-5-kubernetes-errors-explained-and-fixed-4aec</guid>
      <description>&lt;p&gt;Your Pod isn't running, and &lt;code&gt;kubectl get pods&lt;/code&gt; gives you one word: Pending, ImagePullBackOff, CrashLoopBackOff. Each word points to a different step in a Pod's life, and each one has a command that tells you exactly what went wrong.&lt;/p&gt;

&lt;p&gt;This post walks through the five problems I see most often, with real terminal output for each one and the fix. The video at the top covers the same ground in four and a half minutes if you'd rather watch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where these words come from
&lt;/h2&gt;

&lt;p&gt;When you create a Pod, the cluster accepts it and the Pod is &lt;strong&gt;Pending&lt;/strong&gt;. Pending covers two things: waiting for the scheduler to pick a node, and downloading the container images. Once the Pod is bound to a node, its containers exist and at least one is running, starting or restarting, the Pod is &lt;strong&gt;Running&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Each of the five problems below breaks a different step:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pending&lt;/strong&gt;: no node was chosen.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ImagePullBackOff&lt;/strong&gt;: the image never arrived.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CrashLoopBackOff&lt;/strong&gt;: the process starts and exits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OOMKilled&lt;/strong&gt;: the kernel killed the process for using too much memory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Restarts while the app is fine&lt;/strong&gt;: a liveness probe tells Kubernetes to restart a healthy container.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The routine: three commands
&lt;/h2&gt;

&lt;p&gt;For all five, the routine is the same:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;kubectl get pods&lt;/code&gt; tells you which word you have.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kubectl describe pod &amp;lt;name&amp;gt;&lt;/code&gt; shows the events and the container's last state.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kubectl logs &amp;lt;name&amp;gt; --previous&lt;/code&gt; shows what the container printed before its last restart.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Most of the time, the answer is in step 2.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Pending: no node fits
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;fast-db&lt;/code&gt; has been Pending for twenty seconds.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get pods
NAME      READY   STATUS    RESTARTS   AGE
fast-db   0/1     Pending   0          20s

$ kubectl describe pod fast-db
Node-Selectors:  disk=nvme
Events:
  Warning  FailedScheduling  20s  default-scheduler  0/3 nodes are available: 1 node(s) didn't match Pod's node affinity/selector, 1 node(s) had untolerated taint {node-role.kubernetes.io/control-plane: }, 1 node(s) had untolerated taint {workload: batch}.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The &lt;code&gt;FailedScheduling&lt;/code&gt; event gives a reason for every node: one didn't match the Pod's node selector, and the other two have taints the Pod doesn't tolerate. The selector asks for &lt;code&gt;disk=nvme&lt;/code&gt;. Let's see which node actually has a disk label:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get nodes -l disk=ssd
NAME     STATUS   ROLES    AGE   VERSION
node02   Ready    &amp;lt;none&amp;gt;   15m   v1.35.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Only node02 has one, and it says &lt;code&gt;ssd&lt;/code&gt;. Kubernetes only schedules a Pod onto nodes that have every label in its &lt;code&gt;nodeSelector&lt;/code&gt;, so this Pod would wait forever. Change the selector to &lt;code&gt;disk: ssd&lt;/code&gt; in &lt;code&gt;fast-db.yaml&lt;/code&gt; and replace the Pod:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ kubectl replace --force -f fast-db.yaml

$ kubectl get pod fast-db -o wide
NAME      READY   STATUS    RESTARTS   AGE   IP           NODE
fast-db   1/1     Running   0          10s   10.244.2.4   node02
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; Pending? Run &lt;code&gt;describe&lt;/code&gt; and read the events.&lt;/p&gt;

&lt;p&gt;One-minute version: &lt;a href="https://www.youtube.com/shorts/MPLcPIi3EI8" rel="noopener noreferrer"&gt;Kubernetes Pod Stuck in Pending: Cause and Fix&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  2. ImagePullBackOff: the image never arrived
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get pods
NAME     READY   STATUS             RESTARTS   AGE
webapp   0/1     ImagePullBackOff   0          20s

$ kubectl describe pod webapp
    Image:          ngnix:1.27
Events:
  Warning  Failed   19s  kubelet  Failed to pull image "ngnix:1.27": ... pull access denied, repository does not exist or may require authorization ...
  Warning  Failed   19s  kubelet  Error: ErrImagePull
  Normal   BackOff  18s  kubelet  Back-off pulling image "ngnix:1.27"
  Warning  Failed   18s  kubelet  Error: ImagePullBackOff
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The kubelet couldn't download the image. There are two usual reasons: the name or tag is wrong, or the registry is private and the Pod has no pull secret. BackOff means it keeps trying, waiting longer each time, up to five minutes.&lt;/p&gt;

&lt;p&gt;Read the image name slowly: &lt;code&gt;ngnix&lt;/code&gt;. Two letters are swapped. You can change the image of a running Pod, so one command fixes it:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ kubectl &lt;span class="nb"&gt;set&lt;/span&gt; image pod/webapp &lt;span class="nv"&gt;webapp&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;nginx:1.27
pod/webapp image updated

$ kubectl get pods
NAME     READY   STATUS    RESTARTS   AGE
webapp   1/1     Running   0          35s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; ImagePullBackOff? Check the image name and tag before anything else.&lt;/p&gt;

&lt;p&gt;One-minute version: &lt;a href="https://www.youtube.com/shorts/pdmX-teDflc" rel="noopener noreferrer"&gt;Kubernetes ImagePullBackOff: Cause and Fix&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  3. CrashLoopBackOff: Kubernetes is fine, your process isn't
&lt;/h2&gt;

&lt;p&gt;This is the one people misread most.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get pods
NAME     READY   STATUS             RESTARTS      AGE
worker   0/1     CrashLoopBackOff   3 (17s ago)   30s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;CrashLoopBackOff sounds like Kubernetes is broken. It isn't. The container starts, the process exits, and the kubelet restarts it, waiting ten seconds, then twenty, then forty, up to five minutes. That waiting is the BackOff. The timer resets once the container has run fine for ten minutes.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl describe pod worker
    Command:
      sh
      -c
      echo processing jobs; sleeep 3600
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       Error
      Exit Code:    127
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Exit code 127 means "command not found" in a shell. Now the most useful flag for this status, &lt;code&gt;--previous&lt;/code&gt;, which shows the output of the attempt that just died:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ kubectl logs worker --previous
processing &lt;span class="nb"&gt;jobs&lt;/span&gt;
sh: sleeep: not found
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Three e's. Fix the typo and replace the Pod:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;$ sed -i &lt;span class="s1"&gt;'s/sleeep/sleep/'&lt;/span&gt; worker.yaml
$ kubectl replace --force -f worker.yaml

$ kubectl get pods
NAME     READY   STATUS    RESTARTS   AGE
worker   1/1     Running   0          10s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; CrashLoopBackOff? Read &lt;code&gt;logs --previous&lt;/code&gt; first.&lt;/p&gt;

&lt;p&gt;One-minute version: &lt;a href="https://www.youtube.com/shorts/ZVrLXSd7D3w" rel="noopener noreferrer"&gt;Kubernetes CrashLoopBackOff: Cause and Fix&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  4. OOMKilled: hiding behind CrashLoopBackOff
&lt;/h2&gt;

&lt;p&gt;Here's a trap. This Pod also says CrashLoopBackOff, but the cause is completely different.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get pods -n reports
NAME                        READY   STATUS             RESTARTS      AGE
renderer-bfqsczsg7g-pl5bw   0/1     CrashLoopBackOff   3 (15s ago)   30s

$ kubectl describe pod -n reports -l app=renderer
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       OOMKilled
      Exit Code:    137
    Limits:
      memory:  64Mi
    Requests:
      memory:     32Mi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;code&gt;Last State&lt;/code&gt; says &lt;strong&gt;OOMKilled&lt;/strong&gt;, exit code 137. 137 is 128 plus 9, and signal 9 is SIGKILL. The process went over its 64Mi memory limit and the kernel killed it, then the kubelet restarted it, again and again.&lt;/p&gt;

&lt;p&gt;The team says the app needs about 100Mi normally and 200Mi at month end. A container can use more than its request, but never more than its limit. Set the request to 128Mi and the limit to 256Mi:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ kubectl &lt;span class="nb"&gt;set&lt;/span&gt; resources deployment renderer -n reports --requests=memory=128Mi --limits=memory=256Mi
deployment.apps/renderer resource requirements updated

$ kubectl rollout status deployment/renderer -n reports --timeout=60s
deployment &lt;span class="s2"&gt;"renderer"&lt;/span&gt; successfully rolled out

$ kubectl get pods -n reports
NAME                        READY   STATUS    RESTARTS   AGE
renderer-lkhgjzqfr6-x67cf   1/1     Running   0          23s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; CPU limits slow a container down. Memory limits kill it.&lt;/p&gt;

&lt;p&gt;One-minute version: &lt;a href="https://www.youtube.com/shorts/10OUWnEa0HQ" rel="noopener noreferrer"&gt;Kubernetes OOMKilled (Exit Code 137): Cause and Fix&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  5. Restarts while the app is fine: a liveness probe
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get pods
NAME       READY   STATUS    RESTARTS     AGE
frontend   1/1     Running   7 (1s ago)   40s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Running, ready, and seven restarts in forty seconds. Who keeps killing it?&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl describe pod frontend
    Liveness:       http-get http://:80/healthz delay=0s timeout=1s period=5s #success=1 #failure=2
Events:
  Warning  Unhealthy  1s (x15 over 37s)  kubelet  Liveness probe failed: HTTP probe failed with statuscode: 404
  Normal   Killing    1s (x7 over 32s)   kubelet  Container nginx failed liveness probe, will be restarted
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A liveness probe calls &lt;code&gt;/healthz&lt;/code&gt; on port 80 and gets a 404, so the kubelet kills the container and starts it again. The logs from before the restart confirm it:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl logs frontend --previous
192.168.56.11 - - [23/Nov/2026:10:00:40 +0000] "GET /healthz HTTP/1.1" 404 146 "-" "kube-probe/1.35" "-"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;nginx is healthy. It just has no &lt;code&gt;/healthz&lt;/code&gt; page. Keep the difference in mind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A failing &lt;strong&gt;liveness&lt;/strong&gt; probe makes the kubelet kill and restart the container.&lt;/li&gt;
&lt;li&gt;A failing &lt;strong&gt;readiness&lt;/strong&gt; probe only takes the Pod out of its Services. No restart.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Point the probe at a path that exists (here, &lt;code&gt;/&lt;/code&gt;), replace the Pod, and the restarts stop:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ kubectl get pods
NAME       READY   STATUS    RESTARTS   AGE
frontend   1/1     Running   0          20s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; a healthy app that keeps restarting? Check the probe.&lt;/p&gt;

&lt;p&gt;One-minute version: &lt;a href="https://www.youtube.com/shorts/nMRPq83F0YM" rel="noopener noreferrer"&gt;Kubernetes Pod Keeps Restarting (Liveness Probe): Cause and Fix&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Cheat sheet
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;th&gt;Where to look&lt;/th&gt;
&lt;th&gt;Usual cause&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Pending&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;describe&lt;/code&gt;, Events&lt;/td&gt;
&lt;td&gt;No node fits: a label or a taint&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ImagePullBackOff&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;describe&lt;/code&gt;, Events&lt;/td&gt;
&lt;td&gt;Wrong image name or tag, or a private registry without a pull secret&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CrashLoopBackOff&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;logs --previous&lt;/code&gt;, Last State&lt;/td&gt;
&lt;td&gt;The process inside exits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OOMKilled (shown as CrashLoopBackOff)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;describe&lt;/code&gt;, Last State&lt;/td&gt;
&lt;td&gt;Over the memory limit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Restarts, app is fine&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;describe&lt;/code&gt;, Events&lt;/td&gt;
&lt;td&gt;A liveness probe checking the wrong thing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h2&gt;
  
  
  Try it yourself
&lt;/h2&gt;

&lt;p&gt;Every terminal output above comes from PodSim, a free, open-source Kubernetes training simulator I'm building. It runs in your browser, so there's no cluster to set up. Each problem is a lab with its own checks, so you can break it, fix it and see if your fix holds.&lt;/p&gt;

&lt;p&gt;Open &lt;a href="https://sdtslmn.github.io/podsim/" rel="noopener noreferrer"&gt;sdtslmn.github.io/podsim&lt;/a&gt;, go to Labs, and pick:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;I19&lt;/strong&gt; for Pending&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;B15&lt;/strong&gt; for ImagePullBackOff&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;B16&lt;/strong&gt; for CrashLoopBackOff&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;S07&lt;/strong&gt; for OOMKilled&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I11&lt;/strong&gt; for the liveness probe restart loop&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/sdtslmn" rel="noopener noreferrer"&gt;
        sdtslmn
      &lt;/a&gt; / &lt;a href="https://github.com/sdtslmn/podsim" rel="noopener noreferrer"&gt;
        podsim
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      PodSim: Kubernetes training simulator. Practice kubectl on a simulated cluster in the browser or terminal, with guided labs.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;PodSim&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;A Kubernetes training simulator. Practice &lt;code&gt;kubectl&lt;/code&gt; on a simulated cluster, in your terminal or in the browser, along a training path from your first Pod to real-life production scenarios. Every lab checks your work automatically, and a CKAD track with two timed mock exams prepares you for the certification.&lt;/p&gt;

&lt;p&gt;Nothing here runs real containers. The simulator models how Kubernetes objects behave: the scheduler places Pods on nodes, the kubelet pulls images and starts containers, Deployments roll out new ReplicaSets, Services collect endpoints. You see the same states, events and error messages a real cluster gives you, without installing anything or paying for a cluster.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it in the browser:&lt;/strong&gt; &lt;a href="https://sdtslmn.github.io/podsim/" rel="nofollow noopener noreferrer"&gt;https://sdtslmn.github.io/podsim/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/sdtslmn/podsim/docs/images/web-lab.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fsdtslmn%2Fpodsim%2FHEAD%2Fdocs%2Fimages%2Fweb-lab.png" alt="The browser version running the Services lab"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why a simulator&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;Real practice clusters (Killercoda, KodeKloud, kind, minikube) are great once you know the basics. For a first contact they are often too much: you wait for VMs, things break in ways that have nothing to do…&lt;/p&gt;&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/sdtslmn/podsim" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;Next in this series: your Pod is running, but nobody can reach it. Services with no endpoints, readiness probes, DNS, NetworkPolicy and Ingress 404s.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/" rel="noopener noreferrer"&gt;Pod lifecycle&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/concepts/containers/images/" rel="noopener noreferrer"&gt;Images&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/" rel="noopener noreferrer"&gt;Assigning Pods to Nodes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/tasks/configure-pod-container/assign-memory-resource/" rel="noopener noreferrer"&gt;Assign Memory Resources to Containers and Pods&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" rel="noopener noreferrer"&gt;Resource Management for Pods and Containers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/" rel="noopener noreferrer"&gt;Configure Liveness, Readiness and Startup Probes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.gnu.org/software/bash/manual/html_node/Exit-Status.html" rel="noopener noreferrer"&gt;Bash manual: Exit Status&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;I post a one-minute Kubernetes fix most days on &lt;a href="https://www.youtube.com/@KubernetesInaMinute" rel="noopener noreferrer"&gt;Kubernetes in a Minute&lt;/a&gt;. Questions or a status you keep running into? Leave a comment.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Kubernetes® is a registered trademark of The Linux Foundation. This post is independent and not affiliated with or endorsed by The Linux Foundation or the CNCF.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Azure in 60 Seconds: What is a Landing Zone?</title>
      <dc:creator>Sedat SALMAN</dc:creator>
      <pubDate>Sun, 03 May 2026 15:13:25 +0000</pubDate>
      <link>https://dev.to/sdtslmn/azure-in-60-seconds-what-is-a-landing-zone-2l6f</link>
      <guid>https://dev.to/sdtslmn/azure-in-60-seconds-what-is-a-landing-zone-2l6f</guid>
      <description>&lt;h3&gt;
  
  
  1. Foundation of Your Cloud
&lt;/h3&gt;

&lt;p&gt;A Landing Zone is the starting architecture for your Azure environment.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It defines how everything will be deployed, secured, and managed.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  2. Not Just a Subscription
&lt;/h3&gt;

&lt;p&gt;It’s more than creating a subscription.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It includes identity, networking, governance, and security baseline.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  3. Identity and Access Design
&lt;/h3&gt;

&lt;p&gt;Controls who can do what across the environment.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Use Entra ID, RBAC, and managed identities.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  4. Network Architecture
&lt;/h3&gt;

&lt;p&gt;Defines how resources communicate securely.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Hub-spoke model, private endpoints, DNS, and segmentation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  5. Governance and Policies
&lt;/h3&gt;

&lt;p&gt;Ensures consistency and compliance.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Naming standards, tagging, policies, and role separation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  6. Security Baseline
&lt;/h3&gt;

&lt;p&gt;Built-in controls from day one.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Logging, monitoring, threat protection, and secure configurations.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  7. Management and Monitoring
&lt;/h3&gt;

&lt;p&gt;Central visibility and control.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Log Analytics, alerts, and operational dashboards.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  8. Designed for Scale
&lt;/h3&gt;

&lt;p&gt;Landing Zone is built for future growth.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Supports multiple subscriptions, environments, and regions.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  9. Workload Ready
&lt;/h3&gt;

&lt;p&gt;Applications are deployed on top of the Landing Zone.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It prepares the environment before any workload goes live.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  10. Based on Best Practices
&lt;/h3&gt;

&lt;p&gt;Usually aligned with Microsoft Cloud Adoption Framework (CAF).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Standardized, repeatable, and enterprise-ready.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Simple View:&lt;/strong&gt;&lt;br&gt;
Landing Zone = Your Azure blueprint for secure, scalable, and governed deployments from day one.&lt;/p&gt;

</description>
      <category>azure</category>
    </item>
    <item>
      <title>Azure in 60 Seconds: What Clients Always Get Wrong</title>
      <dc:creator>Sedat SALMAN</dc:creator>
      <pubDate>Sun, 03 May 2026 14:46:42 +0000</pubDate>
      <link>https://dev.to/sdtslmn/azure-in-60-seconds-what-clients-always-get-wrong-5fbp</link>
      <guid>https://dev.to/sdtslmn/azure-in-60-seconds-what-clients-always-get-wrong-5fbp</guid>
      <description>&lt;h3&gt;
  
  
  1. Cloud Will Automatically Save Money
&lt;/h3&gt;

&lt;p&gt;Costs increase quickly without design and control.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Optimize architecture, not just pricing.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  2. Treating Azure Like On-Prem
&lt;/h3&gt;

&lt;p&gt;Lifting and shifting VMs without redesign = poor performance + high cost.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Use PaaS and cloud-native patterns.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  3. Ignoring Identity Design
&lt;/h3&gt;

&lt;p&gt;Users, apps, and services need structured access control.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Design RBAC, groups, and managed identities from day one.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  4. No Network Planning
&lt;/h3&gt;

&lt;p&gt;IP overlap, DNS issues, and broken connectivity happen later.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Define hub-spoke, IP ranges, and DNS early.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  5. Skipping Governance
&lt;/h3&gt;

&lt;p&gt;No naming, no tagging, no policy = no control.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Implement landing zones, policies, and standards.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  6. Thinking Security is “Handled by Azure”
&lt;/h3&gt;

&lt;p&gt;Cloud is shared responsibility.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You are still responsible for data, access, and configuration.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  7. No Cost Monitoring
&lt;/h3&gt;

&lt;p&gt;Bills become a surprise at the end of the month.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Use Azure Cost Management with budgets and alerts.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  8. Overengineering Early
&lt;/h3&gt;

&lt;p&gt;Too many services, too complex design.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Start simple, scale when needed.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  9. No Backup / DR Strategy
&lt;/h3&gt;

&lt;p&gt;Assuming cloud = safe is risky.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Define backup, retention, and recovery processes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  10. Ignoring Operations
&lt;/h3&gt;

&lt;p&gt;Deployment is easy, operations are not.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Plan monitoring, patching, and incident response.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Reality:&lt;/strong&gt;&lt;br&gt;
Most Azure problems are not technical — they come from wrong assumptions and missing fundamentals.&lt;/p&gt;

</description>
      <category>azure</category>
    </item>
    <item>
      <title>Azure in 60 Seconds: Mistakes Killing Your Budget</title>
      <dc:creator>Sedat SALMAN</dc:creator>
      <pubDate>Sun, 03 May 2026 13:50:07 +0000</pubDate>
      <link>https://dev.to/sdtslmn/azure-in-60-seconds-mistakes-killing-your-budget-2fac</link>
      <guid>https://dev.to/sdtslmn/azure-in-60-seconds-mistakes-killing-your-budget-2fac</guid>
      <description>&lt;h3&gt;
  
  
  1. Leaving Resources Running
&lt;/h3&gt;

&lt;p&gt;Unused VMs, disks, and test environments running 24/7 = silent cost leak.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Stop, deallocate, or schedule shutdowns.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  2. Overprovisioning
&lt;/h3&gt;

&lt;p&gt;Using large VM sizes “just in case” wastes money.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Start small, monitor usage, then scale.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  3. No Cost Visibility
&lt;/h2&gt;

&lt;p&gt;If you don’t track it, you can’t control it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Use Azure Cost Management for budgets and alerts.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  4. Ignoring Storage Costs
&lt;/h3&gt;

&lt;p&gt;Snapshots, backups, and logs grow silently over time.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Apply lifecycle policies and clean up regularly.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  5. No Auto-Scaling
&lt;/h3&gt;

&lt;p&gt;Fixed resources can’t adapt to real demand.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Enable auto-scale to match usage dynamically.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  6. Paying Pay-As-You-Go for Everything
&lt;/h3&gt;

&lt;p&gt;Long-running workloads on PAYG = expensive.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Use Reserved Instances or Savings Plans.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  7. Unused Public IPs &amp;amp; Load Balancers
&lt;/h3&gt;

&lt;p&gt;Even idle networking components can cost money.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Remove or consolidate unused resources.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  8. Poor Tagging Strategy
&lt;/h3&gt;

&lt;p&gt;No tags = no accountability or visibility.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Use tags for cost allocation and tracking.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  9. Wrong Service Choice
&lt;/h3&gt;

&lt;p&gt;Using IaaS where PaaS is enough increases cost and effort.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Choose the right service model for the workload.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  10. Cross-Region Data Transfer
&lt;/h3&gt;

&lt;p&gt;Moving data between regions adds hidden charges.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Keep workloads and data in the same region when possible.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Quick Win:&lt;/strong&gt;&lt;br&gt;
Tag resources + enable budgets + auto-shutdown = immediate cost control.&lt;/p&gt;

</description>
      <category>azure</category>
    </item>
  </channel>
</rss>
