<p>I confused between Multi-Container Pod Design patterns.<br>
(sidecar, adapter, ambassador)  </p>

<p>What I understand is :<br>
<strong>Sidecar</strong> : container + container(share same resource and do other functions)<br>
<strong>Adapter</strong> : container + adapter(for checking other container's status. <em>e.g. monitoring</em>)<br>
<strong>Ambassador</strong> : container + proxy(to networking outside)  </p>

<blockquote>
  <p>But, According to <a href="https://istio.io/docs/setup/additional-setup/sidecar-injection/#injection" rel="noreferrer">Istio -Installing the Sidecar</a>, They introduce proxy as a sidecar pattern. </p>
</blockquote>

<p>Adapter is container, and Proxy is container too.  </p>

<p>So, My question is <strong>What is differences between Sidecar pattern and Adapter&amp;Ambassador pattern?</strong>  </p>

<p>Is the Sidecar pattern concept contain Adapter&amp;Ambassador pattern?</p>

GRu. L
<p>First, you are right, the term <strong>sidecar</strong> container has now became a word for describing <em>an extra container</em> in your pod. <a href="https://kubernetes.io/blog/2015/06/the-distributed-system-toolkit-patterns/" rel="noreferrer">Originally(?)</a> it was a specific multi-container design pattern.</p>

<h2>Multi-container design patterns</h2>

<p><strong>Sidecar pattern</strong></p>

<p>An extra container in your pod to <strong>enhance</strong> or <strong>extend</strong> the functionality of the main container.</p>

<p><strong>Ambassador pattern</strong></p>

<p>A container that <strong>proxy the network connection</strong> to the main container.</p>

<p><strong>Adapter pattern</strong></p>

<p>A container that <strong>transform output</strong> of the main container.</p>

<p>This is taken from the original article from 2015: <a href="https://kubernetes.io/blog/2015/06/the-distributed-system-toolkit-patterns/" rel="noreferrer">Patterns for Composite Containers</a></p>

<h2>Summary</h2>

<p>Your note on</p>

<blockquote>
  <p>But, According to Istio -Installing the Sidecar, They introduce proxy as a sidecar pattern.</p>
</blockquote>

<p>In the patterns above, both <em>Ambassador</em> and <em>Adapter</em> must in fact <strong>proxy</strong> the network connection, but do it with different purpose. With Istio, this is done e.g. to terminate <strong>mTLS</strong> connection, collect metrics and more to <strong>enhance</strong> your main container. So it actually is a <strong>sidecar pattern</strong> but confusingly, as you correctly pointed out, all pattern <em>proxy the connection</em> - but for different purposes.</p>
