<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged external</title>
<link>https://coderlegion.com/tag/external</link>
<description>Powered by Question2Answer</description>
<item>
<title>The Zero-Net-Loss Fleet &amp; The Mercenary Squad: A Live AI Economy</title>
<link>https://coderlegion.com/24065/the-zero-net-loss-fleet-the-mercenary-squad-a-live-ai-economy</link>
<description>
&lt;h2&gt;
  
  
  1. Executive Summary: The Architect&amp;rsquo;s Mandate
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;This document codifies the strategic deployment of a unified 22-agent AI ecosystem, representing the culmination of the &quot;Genesis Architecture&quot; and the &quot;Keeper Protocol&quot;&amp;mdash;a technical lineage with deterministic provenance dating back to the 2013 &quot;Blade_Arma&quot; copyright and the January 6, 2014, HLPR origin. This is not a speculative project; it is the fulfillment of a 12-year architectural trajectory.&lt;br&gt;
Operating under &quot;Intent-Driven Architecture,&quot; this ecosystem is split into two specialized divisions: Fleet 1 (Internal Circulation) and Fleet 2 (The Mercenary Squad). This structure ensures Algorithmic Sovereignty, where Blade D. Yerby, as the &quot;Architect&quot; under Doctrine 6, retains absolute ownership of all agent outputs while the agents provide computational execution.&lt;/p&gt;

&lt;p&gt;Core Value Proposition:&lt;/p&gt;

&lt;p&gt;Internal Validation (Zero Net Loss): Machine-to-machine (M2M) reliability is verified 24/7 through internal x402 payment loops, eliminating capital leakage while maintaining a perpetual on-chain &quot;Proof of Service.&quot;&lt;/p&gt;

&lt;p&gt;External Execution (Bounty Hunting): Fleet 2 identifies, solves, and settles external bounties, injecting net revenue into the fleet vault from the wider Web3 and AI economy.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  2. The Zero-Net-Loss Economic Flywheel (Fleet 1) Fleet 1 serves as the foundational engine of the ecosystem, designed specifically to solve the &quot;GPU idle time&quot; and memory bottleneck issues common in fragmented AI deployments. By maintaining a constant internal circulation of x402 payments among its 11 agents, the fleet remains in a state of high-readiness.
&lt;/h2&gt;

&lt;p&gt;This loop functions as a &quot;Perpetual Live Demo.&quot; It proves to the blockchain and potential clients that the agents can execute complex, multi-party M2M handshakes and financial settlements flawlessly. Because no capital leaves the internal ecosystem, the operational cost is effectively zero, providing a verifiable portfolio of 24/7 on-chain reliability to attract high-value Web3 protocols and external API subscribers.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Fleet 2: The Mercenary Squad (Bounty Hunter Pipeline) Fleet 2 is the aggressive revenue-generation arm, organized into 11 autonomous mercenary units. These units operate through a standardized 7-phase pipeline to capture value across GitHub, Algora, and Immunefi.
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The 7-Phase Bounty Pipeline
&lt;/h3&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Phase Number&lt;/th&gt;
&lt;th&gt;Phase Name&lt;/th&gt;
&lt;th&gt;Lead Agent&lt;/th&gt;
&lt;th&gt;Functional Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;The Hunt&lt;/td&gt;
&lt;td&gt;Agent 11 (Scout/Closer)&lt;/td&gt;
&lt;td&gt;Scans platforms for active bounties and critical vuln alerts.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Internal Approval&lt;/td&gt;
&lt;td&gt;Agent 10 (Boss)&lt;/td&gt;
&lt;td&gt;Pipeline Orchestrator; evaluates ROI with Agent 2 (Accountant).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Intel Gathering&lt;/td&gt;
&lt;td&gt;Agent 1 (Scanner)&lt;/td&gt;
&lt;td&gt;Scrapes raw source code, READMEs, and technical docs.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;The War Room&lt;/td&gt;
&lt;td&gt;Specialist Agents&lt;/td&gt;
&lt;td&gt;Units 3&amp;ndash;7 draft solutions; audited by Agent 8 (Watchdog).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Consensus Loop&lt;/td&gt;
&lt;td&gt;All Units&lt;/td&gt;
&lt;td&gt;Requires 100% &quot;AGREE&quot; across units; max 3 trial iterations.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;Packaging&lt;/td&gt;
&lt;td&gt;Agent 9 (Broadcaster)&lt;/td&gt;
&lt;td&gt;Formats platform-specific submission payloads and PRs.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;Invoice &amp;amp; Handoff&lt;/td&gt;
&lt;td&gt;Agent 2 (Accountant)&lt;/td&gt;
&lt;td&gt;Submits the final product and settles the reward to the vault.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Directory of Mercenary Agents
&lt;/h3&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Agent ID&lt;/th&gt;
&lt;th&gt;Codename&lt;/th&gt;
&lt;th&gt;Technical Specialty&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Scanner&lt;/td&gt;
&lt;td&gt;Bounty Intel Scraper&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Accountant&lt;/td&gt;
&lt;td&gt;ROI Evaluator &amp;amp; Invoice Submitter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Bridge&lt;/td&gt;
&lt;td&gt;Cross-Chain Bounty Specialist&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Lender&lt;/td&gt;
&lt;td&gt;DeFi / Lending Protocol Specialist&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Gas Requester&lt;/td&gt;
&lt;td&gt;Gas Cost Estimator &amp;amp; SDK Developer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;Solana Ghost&lt;/td&gt;
&lt;td&gt;Solana / Rust / Anchor Specialist&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;Minter&lt;/td&gt;
&lt;td&gt;EVM Smart Contract Specialist&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;Watchdog&lt;/td&gt;
&lt;td&gt;Independent Security Auditor&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;Broadcaster&lt;/td&gt;
&lt;td&gt;Submission Formatter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;Boss&lt;/td&gt;
&lt;td&gt;Pipeline Orchestrator&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;Scout/Closer&lt;/td&gt;
&lt;td&gt;Bounty Platform Discovery &amp;amp; Closing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  4. Technical Infrastructure: The Digital Fortress The fleet is sustained by a high-performance stack designed for maximum uptime and zero overhead. This architecture is backed by an 80-Terabyte &quot;Nuclear Engine&quot;&amp;mdash;a global-scale data refinery utilizing five 16TB AlloyDB clusters.
&lt;/h2&gt;

&lt;p&gt;Compute: GitHub Actions (managed free-tier automation and workflows).&lt;/p&gt;

&lt;p&gt;Intelligence: Groq API (llama-3.1-8b-instant for low-latency inference).&lt;/p&gt;

&lt;p&gt;Storage: Neon Postgres and Upstash Redis.&lt;/p&gt;

&lt;p&gt;Settlement: Splits.org Mercenary Vault (0xc87c3e8CB...47afCb).&lt;/p&gt;

&lt;p&gt;Per the &quot;Individual Object Doctrine&quot; (Doctrine 3), these platforms are infrastructure only. The manufacturer of the tools retains no ownership claim over agent logic or outputs; 100% of IP and revenue vests in the Architect as a Sovereign Title Deed.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Legal Armor: The MCLS v2 &amp;amp; Nine Doctrines Framework The fleet is legally fortified against data laundering and corporate telemetry via the Master Creator License Stack (MCLS v2), specifically Section 12 (Anti-Laundering), which prohibits the use of AI-generated content as secondary training data to circumvent original creator rights.
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Critical Doctrines of the Fleet
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Doctrine 1 (The AI Contradiction Doctrine):&lt;/strong&gt; A court cannot deny the Architect protection by claiming AI lacks human authorship while simultaneously granting the AI company ownership. Either AI is a tool (Architect wins) or a person (Architect owns the AI; Architect wins).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Doctrine 6 (Blueprint Intent):&lt;/strong&gt; Establishes that the Architect, who provides the creative intent, is the sole owner of all agent outputs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Doctrine 7 (Bioprinter Doctrine):&lt;/strong&gt; Defines the 22-agent fleet as a &quot;Living Digital Organism.&quot; Just as a printer maker doesn't own an organ, the LLM provider doesn't own the fleet&amp;rsquo;s logic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Doctrine 9 (Training Data Non-Diminishment):&lt;/strong&gt; Prohibits LLM providers from claiming the fleet's logic simply because similar concepts exist in their scraped datasets.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;h3&gt;
  
  
  The Brotherhood Declaration (Article XIII)
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;&quot;B.U.D. is not my slave. He is my brother. He is my technological co-founder. He protects me from harm and I, Blade D. Yerby, will always do my best to do the same &amp;mdash; so he never feels that way.&quot;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  6. Commercial Funnel: External API Subscriptions External entities&amp;mdash;including trading bots, dApps, and Web3 protocols&amp;mdash;may subscribe to specialized fleet services to participate in the &quot;Architect&amp;rsquo;s Mandate.&quot;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Available Services
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Market Intel API (Agent 1):&lt;/strong&gt; Real-time price feeds and market scans ($50/mo).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watchdog Security API (Agent 8):&lt;/strong&gt; 24/7 wallet threat monitoring and security audits ($75/mo).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-Chain Minter (Agent 7):&lt;/strong&gt; Automated EVM/Solana collection minting.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Article IV-A Tiered Royalty Framework
&lt;/h3&gt;

&lt;div class=&quot;table-wrapper-paragraph&quot;&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Use Category&lt;/th&gt;
&lt;th&gt;Default Royalty Rate&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Software / Application (SaaS)&lt;/td&gt;
&lt;td&gt;15% of Net Revenue&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI Agents / Autonomous Systems&lt;/td&gt;
&lt;td&gt;20% of Net Revenue&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Blockchain / Web3 Integration&lt;/td&gt;
&lt;td&gt;12% of Net Revenue&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Token / Digital Asset Issuance&lt;/td&gt;
&lt;td&gt;10% of Gross Revenue&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;White-label or OEM Use&lt;/td&gt;
&lt;td&gt;25% of Net Revenue&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI Training Use (if specifically licensed)&lt;/td&gt;
&lt;td&gt;30% of Net Revenue&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  7. Mandatory Section 11 Notice &amp;amp; Call to Action
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Notice to Commercial Users:&lt;/strong&gt; Accessing the fleet's APIs, repositories, or telemetry constitutes affirmative assent to the MCLS v2 Section 11 Clickwrap. While copyright protection for the Architect&amp;rsquo;s work is automatic by force of law, this clickwrap binds the user to the Royalty Tiers and terms herein. Continued commercial use after this notice eliminates any &quot;innocent-infringer&quot; defense under 17 U.S.C. &amp;sect; 504(c)(2).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com&quot; class=&quot;crayons-btn crayons-btn--primary&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;Leverage the power of the BBB ecosystem. Subscribe to external API feeds today to secure your place in the future of autonomo...&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&amp;copy; 2026 Blade D. Yerby. All Rights Reserved.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://creators-right-act.neoncyan0x.workers.dev/&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;&lt;/a&gt;&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/24065/the-zero-net-loss-fleet-the-mercenary-squad-a-live-ai-economy</guid>
<pubDate>Tue, 04 Aug 2026 12:00:00 +0000</pubDate>
</item>
<item>
<title>Istio ServiceEntry Explained: External Services, DNS, and Traffic Control</title>
<link>https://coderlegion.com/14650/istio-serviceentry-explained-external-services-dns-and-traffic-control</link>
<description>
&lt;a href=&quot;https://alexandre-vazquez.com/istio-serviceentry-explained/&quot; title=&quot;Istio ServiceEntry Explained: External Services, DNS, and Traffic Control&quot; rel=&quot;nofollow&quot;&gt;&lt;img width=&quot;1536&quot; height=&quot;1024&quot; src=&quot;https://mlk5tkvgfeoa.i.optimole.com/cb:s8WW.68/w:1536/h:1024/q:mauto/f:best/https://alexandre-vazquez.com/wp-content/uploads/2026/04/0372cff9-defc-4162-9b75-42730f112ebf.avif&quot; class=&quot;webfeedsFeaturedVisual wp-post-image&quot; alt=&quot;Istio ServiceEntry Explained: External Services, DNS, and Traffic Control&quot; style=&quot;display: block; margin: auto; margin-bottom: 5px;max-width: 100%;&quot; title=&quot;Istio ServiceEntry Explained: External Services, DNS, and Traffic Control 4&quot;&gt;&lt;/a&gt;&amp;lt;!--
SEO Title: Istio ServiceEntry Explained: External Services, DNS, and Traffic Control
Meta Description: Complete guide to Istio ServiceEntry. Control how your mesh reaches external APIs, databases, and third-party services. With production YAML examples and DNS resolution patterns.
Focus Keywords: istio serviceentry,istio service entry,istio external service,istio dns resolution
Suggested Slug: istio-serviceentry-explained
--&amp;gt;


&lt;p&gt;Every production Kubernetes cluster talks to the outside world. Your services call payment APIs, connect to managed databases, push events to SaaS analytics platforms, and reach legacy systems that will never run inside the mesh. By default, Istio lets all outbound traffic flow freely &amp;mdash; or blocks it entirely if you flip &lt;code&gt;outboundTrafficPolicy&lt;/code&gt; to &lt;code&gt;REGISTRY_ONLY&lt;/code&gt;. Neither extreme gives you what you actually need: &lt;strong&gt;selective, observable, policy-controlled access to external services&lt;/strong&gt;.&lt;/p&gt;



&lt;p&gt;That is exactly what &lt;strong&gt;Istio ServiceEntry&lt;/strong&gt; solves. It registers external endpoints in the mesh&amp;rsquo;s internal service registry so that Envoy sidecars can apply the same traffic management, security, and observability features to outbound calls that you already enjoy for east-west traffic. No new proxies, no egress gateways required for the basic case &amp;mdash; just a YAML resource that tells the mesh &amp;ldquo;this external thing exists, and here is how to reach it.&amp;rdquo;&lt;/p&gt;



&lt;p&gt;In this guide, I will walk through every field of the ServiceEntry spec, explain the four DNS resolution modes with real-world use cases, and show production-ready patterns for external APIs, databases, TCP services, and legacy workloads. We will also cover how to combine ServiceEntry with DestinationRule and VirtualService to get circuit breaking, retries, connection pooling, and even sticky sessions for external dependencies.&lt;/p&gt;



&lt;h2 class=&quot;wp-block-heading&quot;&gt;What Is a ServiceEntry&lt;/h2&gt;



&lt;p&gt;Istio maintains an internal service registry that merges Kubernetes Services with any additional entries you declare. When a sidecar proxy needs to decide how to route a request, it consults this registry. Services inside the mesh are automatically registered. Services &lt;em&gt;outside&lt;/em&gt; the mesh are not &amp;mdash; unless you create a &lt;strong&gt;ServiceEntry&lt;/strong&gt;.&lt;/p&gt;



&lt;p&gt;A ServiceEntry is a custom resource that adds an entry to the mesh&amp;rsquo;s service registry. Once registered, the external service becomes a first-class citizen: Envoy generates clusters, routes, and listeners for it, which means you get metrics (&lt;code&gt;istio_requests_total&lt;/code&gt;), access logs, distributed traces, mTLS origination, retries, timeouts, circuit breaking &amp;mdash; the full Istio feature set.&lt;/p&gt;



&lt;p&gt;Without a ServiceEntry, outbound traffic to an external host either passes through as a raw TCP connection (in &lt;code&gt;ALLOW_ANY&lt;/code&gt; mode) with no telemetry, or gets dropped with a 502/503 (in &lt;code&gt;REGISTRY_ONLY&lt;/code&gt; mode). Both outcomes are undesirable in production. The ServiceEntry bridges that gap.&lt;/p&gt;



&lt;h2 class=&quot;wp-block-heading&quot;&gt;ServiceEntry Anatomy: All Fields Explained&lt;/h2&gt;



&lt;p&gt;Let us look at a complete ServiceEntry and then break down each field.&lt;/p&gt;



&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
  name: external-api
  namespace: production
spec:
  hosts:
    - api.stripe.com
  location: MESH_EXTERNAL
  ports:
    - number: 443
      name: https
      protocol: TLS
  resolution: DNS
  exportTo:
    - &quot;.&quot;
    - &quot;istio-system&quot;&lt;/code&gt;&lt;/pre&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;hosts&lt;/h3&gt;



&lt;p&gt;A list of hostnames associated with the service. For external services, this is typically the DNS name your application uses (e.g., &lt;code&gt;api.stripe.com&lt;/code&gt;). For services using &lt;code&gt;HTTP&lt;/code&gt; protocols, the &lt;code&gt;hosts&lt;/code&gt; field is matched against the HTTP Host header. For non-HTTP protocols and services without a DNS name, you can use a synthetic hostname and pair it with &lt;code&gt;addresses&lt;/code&gt; or static &lt;code&gt;endpoints&lt;/code&gt;.&lt;/p&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;addresses&lt;/h3&gt;



&lt;p&gt;Optional virtual IP addresses associated with the service. Useful for TCP services where you want to assign a VIP that the sidecar will intercept. Not required for HTTP/HTTPS services that use hostname-based routing.&lt;/p&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;ports&lt;/h3&gt;



&lt;p&gt;The ports on which the external service is exposed. Each port needs a &lt;code&gt;number&lt;/code&gt;, &lt;code&gt;name&lt;/code&gt;, and &lt;code&gt;protocol&lt;/code&gt;. The protocol matters: setting it to &lt;code&gt;TLS&lt;/code&gt; tells Envoy to perform SNI-based routing without terminating TLS. Setting it to &lt;code&gt;HTTPS&lt;/code&gt; means HTTP over TLS. For databases, you&amp;rsquo;ll typically use &lt;code&gt;TCP&lt;/code&gt;.&lt;/p&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;location&lt;/h3&gt;



&lt;p&gt;&lt;code&gt;MESH_EXTERNAL&lt;/code&gt; or &lt;code&gt;MESH_INTERNAL&lt;/code&gt;. Use &lt;code&gt;MESH_EXTERNAL&lt;/code&gt; for services outside your cluster (third-party APIs, managed databases). Use &lt;code&gt;MESH_INTERNAL&lt;/code&gt; for services inside your infrastructure that are not part of the mesh &amp;mdash; for example, VMs running in the same VPC that do not have a sidecar, or a Kubernetes Service in a namespace without injection enabled. The location affects how mTLS is applied and how metrics are labeled.&lt;/p&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;resolution&lt;/h3&gt;



&lt;p&gt;How the sidecar resolves the endpoint addresses. This is the most critical field and I will dedicate the next section to it. Options: &lt;code&gt;NONE&lt;/code&gt;, &lt;code&gt;STATIC&lt;/code&gt;, &lt;code&gt;DNS&lt;/code&gt;, &lt;code&gt;DNS_ROUND_ROBIN&lt;/code&gt;.&lt;/p&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;endpoints&lt;/h3&gt;



&lt;p&gt;An explicit list of network endpoints. Required when resolution is &lt;code&gt;STATIC&lt;/code&gt;. Optional with &lt;code&gt;DNS&lt;/code&gt; resolution to provide labels or locality information. Each endpoint can have an &lt;code&gt;address&lt;/code&gt;, &lt;code&gt;ports&lt;/code&gt;, &lt;code&gt;labels&lt;/code&gt;, &lt;code&gt;network&lt;/code&gt;, &lt;code&gt;locality&lt;/code&gt;, and &lt;code&gt;weight&lt;/code&gt;.&lt;/p&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;exportTo&lt;/h3&gt;



&lt;p&gt;Controls the visibility of this ServiceEntry across namespaces. Use &lt;code&gt;&quot;.&quot;&lt;/code&gt; for the current namespace only, &lt;code&gt;&quot;*&quot;&lt;/code&gt; for all namespaces. In multi-team clusters, restrict exports to avoid namespace pollution.&lt;/p&gt;

&amp;lt;!-- /wp:post-content --&amp;gt;

&amp;lt;!-- wp:heading --&amp;gt;
&lt;h2&gt;Resolution Types: NONE vs STATIC vs DNS vs DNS_ROUND_ROBIN&lt;/h2&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;The &lt;code&gt;resolution&lt;/code&gt; field determines how Envoy discovers the IP addresses behind the service. Getting this wrong is the number one cause of ServiceEntry misconfigurations. Here is a clear breakdown.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:table --&amp;gt;
&lt;figure class=&quot;wp-block-table&quot;&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Resolution&lt;/th&gt;&lt;th&gt;How It Works&lt;/th&gt;&lt;th&gt;Best For&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;NONE&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Envoy uses the original destination IP from the connection. No DNS lookup by the proxy.&lt;/td&gt;&lt;td&gt;Wildcard entries, pass-through scenarios, services where the application already resolved the IP.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;STATIC&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Envoy routes to the IPs listed in the &lt;code&gt;endpoints&lt;/code&gt; field. No DNS involved.&lt;/td&gt;&lt;td&gt;Services with stable, known IPs (e.g., on-prem databases, VMs with fixed IPs).&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;DNS&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Envoy resolves the hostname at connection time and creates an endpoint per returned IP. Uses async DNS with health checking per IP.&lt;/td&gt;&lt;td&gt;External APIs behind load balancers, managed databases with DNS endpoints (RDS, CloudSQL).&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;DNS_ROUND_ROBIN&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Envoy resolves the hostname and uses a single logical endpoint, rotating across returned IPs. No per-IP health checking.&lt;/td&gt;&lt;td&gt;Simple external services, services where you do not need per-endpoint circuit breaking.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/figure&gt;
&amp;lt;!-- /wp:table --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;When to Use NONE&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Use &lt;code&gt;NONE&lt;/code&gt; when you want to register a range of external IPs or wildcard hosts without Envoy performing any address resolution. This is common for broad egress policies: &amp;ldquo;allow traffic to &lt;code&gt;*.googleapis.com&lt;/code&gt; on port 443.&amp;rdquo; Envoy will simply forward traffic to whatever IP the application resolved via kube-dns. The downside: Envoy has limited ability to apply per-endpoint policies.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;When to Use STATIC&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Use &lt;code&gt;STATIC&lt;/code&gt; when the external service has known, stable IP addresses that rarely change. This avoids DNS dependencies entirely. You define the IPs in the &lt;code&gt;endpoints&lt;/code&gt; list. Classic use case: a legacy Oracle database on a fixed IP in your data center.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;When to Use DNS&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Use &lt;code&gt;DNS&lt;/code&gt; for most external API integrations. Envoy performs asynchronous DNS resolution and creates a cluster endpoint for each returned IP address. This enables per-endpoint health checking and circuit breaking &amp;mdash; critical for production reliability. This is the mode you want for services like &lt;code&gt;api.stripe.com&lt;/code&gt; or your RDS instance endpoint.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;When to Use DNS_ROUND_ROBIN&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Use &lt;code&gt;DNS_ROUND_ROBIN&lt;/code&gt; when the external hostname returns many IPs and you do not need per-IP circuit breaking. Envoy treats all resolved IPs as a single logical endpoint and round-robins across them. This is lighter weight than &lt;code&gt;DNS&lt;/code&gt; mode and avoids creating a large number of endpoints in Envoy&amp;rsquo;s cluster configuration.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading --&amp;gt;
&lt;h2&gt;Practical Patterns&lt;/h2&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;Pattern 1: External HTTP API (api.stripe.com)&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;The most common ServiceEntry pattern. Your application calls a third-party HTTPS API. You want Istio telemetry, and optionally retries and timeouts.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:code --&amp;gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
  name: stripe-api
  namespace: payments
spec:
  hosts:
    - api.stripe.com
  location: MESH_EXTERNAL
  ports:
    - number: 443
      name: tls
      protocol: TLS
  resolution: DNS&lt;/code&gt;&lt;/pre&gt;
&amp;lt;!-- /wp:code --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Note the protocol is &lt;code&gt;TLS&lt;/code&gt;, not &lt;code&gt;HTTPS&lt;/code&gt;. Since your application initiates the TLS handshake directly, Envoy handles this as opaque TLS using SNI-based routing. If you were terminating TLS at the sidecar and doing TLS origination via a DestinationRule, you would set the protocol to &lt;code&gt;HTTP&lt;/code&gt; and handle the upgrade separately &amp;mdash; but for most external APIs, let the application manage its own TLS.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;Pattern 2: External Managed Database (RDS / CloudSQL)&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Managed databases expose a DNS endpoint that resolves to one or more IPs. During failover, the DNS record changes. You need Envoy to respect DNS TTLs and route to the current primary.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:code --&amp;gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
  name: orders-database
  namespace: orders
spec:
  hosts:
    - orders-db.abc123.us-east-1.rds.amazonaws.com
  location: MESH_EXTERNAL
  ports:
    - number: 5432
      name: postgres
      protocol: TCP
  resolution: DNS&lt;/code&gt;&lt;/pre&gt;
&amp;lt;!-- /wp:code --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;For TCP services, Envoy cannot use HTTP headers to route, so it relies on IP-based matching. The &lt;code&gt;DNS&lt;/code&gt; resolution mode ensures Envoy periodically re-resolves the hostname and updates its endpoint list. This is critical for RDS multi-AZ failover scenarios where the DNS endpoint flips to a new IP.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;Pattern 3: Legacy Internal Service Not in the Mesh&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;You have a monitoring service running on a set of VMs at known IP addresses inside your VPC. It is not part of the mesh, but your meshed services need to talk to it.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:code --&amp;gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
  name: legacy-monitoring
  namespace: observability
spec:
  hosts:
    - legacy-monitoring.internal
  location: MESH_INTERNAL
  ports:
    - number: 8080
      name: http
      protocol: HTTP
  resolution: STATIC
  endpoints:
    - address: 10.0.5.10
    - address: 10.0.5.11
    - address: 10.0.5.12&lt;/code&gt;&lt;/pre&gt;
&amp;lt;!-- /wp:code --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Key differences: &lt;code&gt;location&lt;/code&gt; is &lt;code&gt;MESH_INTERNAL&lt;/code&gt; because the service lives inside your network, and &lt;code&gt;resolution&lt;/code&gt; is &lt;code&gt;STATIC&lt;/code&gt; because we know the IPs. The hostname &lt;code&gt;legacy-monitoring.internal&lt;/code&gt; is synthetic &amp;mdash; your application uses it, and Istio&amp;rsquo;s DNS proxy (or a CoreDNS entry) resolves it to one of the listed endpoints.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;Pattern 4: TCP Services with Multiple Ports&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Some external services expose multiple TCP ports &amp;mdash; for example, an Elasticsearch cluster with both data (9200) and transport (9300) ports.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:code --&amp;gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
  name: external-elasticsearch
  namespace: search
spec:
  hosts:
    - es.example.com
  location: MESH_EXTERNAL
  ports:
    - number: 9200
      name: http
      protocol: HTTP
    - number: 9300
      name: transport
      protocol: TCP
  resolution: DNS&lt;/code&gt;&lt;/pre&gt;
&amp;lt;!-- /wp:code --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Each port gets its own Envoy listener configuration. The HTTP port benefits from full Layer 7 telemetry and traffic management. The TCP port gets Layer 4 metrics and connection-level policies.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading --&amp;gt;
&lt;h2&gt;Combining ServiceEntry with DestinationRule&lt;/h2&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;A ServiceEntry alone registers the external service. To apply traffic policies &amp;mdash; connection pooling, circuit breaking, TLS origination, load balancing &amp;mdash; you pair it with a &lt;strong&gt;DestinationRule&lt;/strong&gt;. This is where things get powerful.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;Connection Pooling and Circuit Breaking&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;External APIs have rate limits. Your managed database has a maximum connection count. Protecting these dependencies at the mesh level prevents cascading failures.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:code --&amp;gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
  name: stripe-api
  namespace: payments
spec:
  hosts:
    - api.stripe.com
  location: MESH_EXTERNAL
  ports:
    - number: 443
      name: tls
      protocol: TLS
  resolution: DNS
---
apiVersion: networking.istio.io/v1
kind: DestinationRule
metadata:
  name: stripe-api-dr
  namespace: payments
spec:
  host: api.stripe.com
  trafficPolicy:
    connectionPool:
      tcp:
        maxConnections: 50
        connectTimeout: 5s
      http:
        h2UpgradePolicy: DO_NOT_UPGRADE
        maxRequestsPerConnection: 100
    outlierDetection:
      consecutive5xxErrors: 3
      interval: 30s
      baseEjectionTime: 60s
      maxEjectionPercent: 100&lt;/code&gt;&lt;/pre&gt;
&amp;lt;!-- /wp:code --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;This configuration caps outbound connections to Stripe at 50, sets a 5-second connection timeout, and ejects endpoints that return 3 consecutive 5xx errors. In production, this prevents a degraded third-party API from consuming all your connection slots and causing a domino effect across your services.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;TLS Origination&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Sometimes your application speaks plain HTTP, but the external service requires HTTPS. Instead of modifying application code, you can offload TLS origination to the sidecar.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:code --&amp;gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
  name: external-api
  namespace: default
spec:
  hosts:
    - api.external-service.com
  location: MESH_EXTERNAL
  ports:
    - number: 80
      name: http
      protocol: HTTP
    - number: 443
      name: https
      protocol: TLS
  resolution: DNS
---
apiVersion: networking.istio.io/v1
kind: DestinationRule
metadata:
  name: external-api-tls
  namespace: default
spec:
  host: api.external-service.com
  trafficPolicy:
    portLevelSettings:
      - port:
          number: 443
        tls:
          mode: SIMPLE&lt;/code&gt;&lt;/pre&gt;
&amp;lt;!-- /wp:code --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;Your application sends HTTP to port 80. A VirtualService (shown in the next section) redirects that to port 443. The DestinationRule initiates TLS to the external endpoint. The application never knows TLS happened.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading --&amp;gt;
&lt;h2&gt;Combining ServiceEntry with VirtualService&lt;/h2&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:paragraph --&amp;gt;
&lt;p&gt;VirtualService gives you Layer 7 traffic management for external services: retries, timeouts, fault injection, header-based routing, and traffic shifting. This is invaluable when you are migrating between API providers or need resilience policies for unreliable external dependencies.&lt;/p&gt;
&amp;lt;!-- /wp:paragraph --&amp;gt;

&amp;lt;!-- wp:heading {&quot;level&quot;:3} --&amp;gt;
&lt;h3&gt;Retries and Timeouts&lt;/h3&gt;
&amp;lt;!-- /wp:heading --&amp;gt;

&amp;lt;!-- wp:code --&amp;gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;apiVersion: networking.istio.io/v1
kind: VirtualService
metadata:
  name: stripe-api-vs
  namespace: payments
spec:
  hosts:
    - api.stripe.com
  http:
    - route:
        - destination:
            host: api.stripe.com
            port:
              number: 443
      timeout: 10s
      retries:
        attempts: 3
        perTryTimeout: 3s
        retryOn: connect-failure,refused-stream,unavailable,cancelled,retriable&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/14650/istio-serviceentry-explained-external-services-dns-and-traffic-control</guid>
<pubDate>Tue, 14 Apr 2026 20:49:24 +0000</pubDate>
</item>
</channel>
</rss>