<p>Deployments are primarily based on stateless services, where data is externalized to be stored on some other storage block or database. Using deployments for stateful services is not recommended as you will encounter scaling problems, since multiple replicas will read from the same persistent volume. </p>

<p>Instead, StatefulSets are the best approach to stateful services. Each replica of the StatefulSet has its own state mounted on a dedicated persistent volume, thus scaling a StatefulSet will create a new persistent volume and attach the new replica to it.</p>

CC BY-SA 4.0
2020-02-23T07:49:41.173Z
2020-02-23T07:49:41.173Z
Souvik Dey
<p>We are looking into moving our Jira instance on a Kubernetes cluster and one of the concerns that were recently risen is whether we should go with a StatefulSet or a Deployment. So, are there any suggestions or lessons learned by using any of the above controllers? Any additional tips, source of information and comments by people who went through the process could be very valuable to us.</p>

<kubernetes><jira>
StatefulSet or Deployment for Jira on Kubernetes
dimitrisd
# StatefulSet or Deployment for Jira on Kubernetes

(Asked by: username_0 on 2020-02-14)

We are looking into moving our Jira instance on a Kubernetes cluster and one of the concerns that were recently risen is whether we should go with a StatefulSet or a Deployment. So, are there any suggestions or lessons learned by using any of the above controllers? Any additional tips, source of information and comments by people who went through the process could be very valuable to us.

**Tags:** kubernetes, jira


---

## 1 answers

### Answer by username_1 on 2020-02-23. Score: 1

Deployments are primarily based on stateless services, where data is externalized to be stored on some other storage block or database. Using deployments for stateful services is not recommended as you will encounter scaling problems, since multiple replicas will read from the same persistent volume.

Instead, StatefulSets are the best approach to stateful services. Each replica of the StatefulSet has its own state mounted on a dedicated persistent volume, thus scaling a StatefulSet will create a new persistent volume and attach the new replica to it.


---

