<p>In the Kubernetes world, a typical/classic pattern is using <code>Deployment</code> for Stateless Applications and using <code>StatefulSet</code> for a stateful application.</p>
<p>I am using a vendor product (<a href="https://www.pingidentity.com/en/pingone/pingaccess.html" rel="nofollow noreferrer">Ping Access</a>) which is meant to be a stateless application (it plays the role of a Proxy in front of other Ping products such as Ping Federate).</p>
<p>The <a href="https://github.com/pingidentity/ping-cloud-base/blob/master/k8s-configs/ping-cloud/base/pingaccess/engine/cloud-generic/statefulset.yaml" rel="nofollow noreferrer">github repo</a> for Ping Cloud (where they run these components as containers) shows them running Ping Access (a stateless application) as a Stateful Set.</p>
<p>I am reaching out to their support team to understand why anyone would run a Stateless application as a StatefulSet.</p>
<p>Are there other examples of such usage (as this appears strange/bizarre IMHO)?</p>
<p>I also observed a scenario where a customer is using a StatefulApp (<a href="https://www.pingidentity.com/en/pingone/pingfederate.html" rel="nofollow noreferrer">Ping Federate</a>) as a regular deployment instead of hosting them as a <code>StatefulSet</code>.</p>
<p>The <a href="https://github.com/pingidentity/ping-cloud-base/blob/master/k8s-configs/ping-cloud/base/pingfederate/engine/cloud-generic/statefulset.yaml" rel="nofollow noreferrer">Ping Cloud repository</a> does build and deploy Ping Federate as a StatefulSet.</p>
<p>Honestly, both these usages, running a stateless app as a <code>StatefulSet</code> (Ping Access) and running a <em>stateful app</em> as a <code>deployment</code> (Ping Federate) sound like classic anti-patterns.</p>

Manglu
<p>Apart from the ability to attach dedicated Volumes to StatefulSets you get the following features of which some might be useful for stateless applications:</p>
<ul>
<li>Ordered startup and shutdown of Pods with K8s doing them one by one in an ordered fashion.</li>
<li>Possibility to guarantee that not more than a single Pod is running at a time even during unscheduled Pod restarts.</li>
<li>Stable DNS names for Pods.</li>
</ul>
<p>I can only speculate, why Ping Federate uses a StatefulSet. Possibly, it has to do with access limitations of the downstream services it connects to.</p>
