<p>I'm exploring K8S possibilities and I'm wonder is there any way to create deployments for two or more apps in single deployment so it is transactional - when something is wrong after deployment all apps are rollbacked. Also I want to mention that <strong>I'm not saying about pod with multiple containers</strong> because additional side car containers are rather intended for some crosscutting concerns like monitoring, authentication (like kerberos) and others but it is not recommended to put different apps in single pod. Having this in mind, is it possible to have single deployment that can produce 2+ kind of pods?</p>

<blockquote>
<p>Is it possible to have single deployment that can produce 2+ kind of pods?</p>
</blockquote>
<p>No.  A Deployment creates only one kind of Pod.  You can update a Deployment's contents, and it will incrementally replace existing Pods with new ones that match the updated Pod spec.</p>
<p>Nothing stops you from creating multiple Deployments, one for each kind of Pod, and that's probably the approach you're looking for here.</p>
<blockquote>
<p>... when something is wrong after deployment all apps are rollbacked.</p>
</blockquote>
<p>Core Kubernetes doesn't have this capability on its own; indeed, it has somewhat limited capacity to tell that something has gone wrong, other than a container failing its health checks or exiting.</p>
<p>Of the various tools in <a href="https://stackoverflow.com/a/71546490">@SYN's answer</a> I at least have some experience with Helm.  It's not quite &quot;transactional&quot; in the sense you might take from a DBMS, but it does have the ability to manage a collection of related resources (a &quot;release&quot; of a &quot;chart&quot;) and it has the ability to roll back an entire version of a release across multiple Deployments if required.  See the <a href="https://docs.helm.sh/docs/helm/helm_rollback/" rel="nofollow noreferrer"><code>helm rollback</code> command</a>.</p>
