<p>I would like to scale up my mysql and mongo database with hpa !</p>
<p>I wonder if i should use <strong>Statefulsets</strong>, <strong>Operators</strong> or both.</p>
<p>Also i can't understand the difference between StatefulSets and Operators.</p>
<p>Could someone help me?</p>
<p>Thank you very much!!</p>

alex
<p>Statefulsets and Operators are not that similar.</p>
<p>Statefulset is a Kubernetes resource that handles pods that you need to hold a state. Normally a pod would get a new name if it is killed and respawned by Kubernetes, but if it is managed by a Statefulset it respawns with the same name. You would often use Statefulset if you want your application to have some persistence.</p>
<p>Operators on the other hand are a pattern used in Kubernetes to extend the normal functionality by adding custom resource definitions (CRD) that are handled by a given operator.</p>
<p>I think you would use Statefulsets if you want to implement your own solution, and use an Operator if you want to use an existing one.</p>
<p>There exist multiple MongoDB Kubernetes Operators out there.but you could look into the <a href="https://www.mongodb.com/try/download/community-kubernetes-operator" rel="nofollow noreferrer">MongoDB Community Kubernetes Operator</a></p>
