Skip to main content
Support
0
Contact us
Nederlands
Deutsch
Español
Dedicated serversFlexible VPSCloud TechnologyColocationChallenges in ITSectorsCareers
Cloud Compute

With Cloud Compute, you have access anytime and anywhere to a portal through which you can configure your entire IT environment from wherever you are in the world.

Cloud Storage

Reliable access to your files, infrastructure, and applications at all times – with no interruptions or delays. At Worldstream, we offer a variety of storage solutions.

Flexible cloud icon
Flexible cloud
Private cloud icon
Private cloud
Bare metal icon
Bare Metal Compute
Hollow cube icon
Object storage
Hollow cube icon
File storage
Block storage icon
Block storage
Backup storage icon
Backup storage
Need support?

With experienced engineers and an average response time track record on 7 minutes, you can expect a solid technical support solution in next to no time.

All Servers

Choose your Dedicated Server now. Custom or Instant Delivery. Powerhouse servers built for your use case.

Use Cases

Whatever your use case, we’re here to help you find the ideal solution.

Deal servers icon
Deals
AMD servers icon
AMD Processors
AI servers icon
Intel Processors
Hollow cube icon
Virtualisation, Containerisation and Orchestration
Hollow cube icon
Websites and Applications
Hollow cube icon
Gaming and Streaming Infrastructure

24/7/365 support with an average response time of just 7 minutes. Thanks to our own data centers, our engineers can go directly to your server for fast, hands-on assistance. Email or call us anytime.

Smart outsourcing

Some IT creates added value, while other types are supportive. Use that as a starting point for outsourcing.

Cost Efficiency

Complete IT packages may seem like the safe option, but when you consider the costs, other choices often make more sense.

IT flexibility & control

Outsourcing doesn’t mean losing control; it actually provides more flexibility and control.

Cloud repatriation

The cloud is not a final destination: You should continuously evaluate and adjust your cloud environment as needs evolve.

Financial services
Logistics & Transportation
Retail & E-commerce
Media & Entertainment
Tech & Software Development
Security
Managed Service Providers
Need support?

With experienced engineers and an average response time track record on 7 minutes, you can expect a solid technical support solution in next to no time.

Chat with usContact us
About WorldstreamAbout the technologyCasesKnowledge base
About usMeet the teamJobsBecome a resellerCertificationsOur data centersOur networkDDoS ProtectionAMD EPYC serversTechnology PartnersOperating SystemsAll casesEasyTerraDutch Drone CompanyPerfGridArticlesFAQNews and BlogsProducts and Services
Contact us

Call +31 (0) 174 – 712 117

Industriestraat 53, Naaldwijk

Nederlands
Deutsch
Español
0
Dedicated serversFlexible VPSCloud TechnologyColocationChallenges in ITSectorsCareersAbout WorldstreamAbout the technologyCasesKnowledge baseMy Worldstream
Contact
Support
NederlandsDeutschEspañol
  1. HomeHome
  2. Knowledge Base
  3. Containers & Kubernetes
  4. Handling stateful services in containers

Handling stateful services in containers

Applies to Kubernetes (preview), Flexible VPS, Dedicated ServersAudience Platform engineer, developerLast reviewed September 2026

Quick answer

Use StatefulSets with persistent volumes for databases and other stateful workloads that genuinely need to run in containers, or keep those services on a VM or dedicated server when that's simpler. Either way, test your backup and restore procedure regularly, that's the part that actually gets skipped.

On this page
  • Why state is the hard part
  • Pattern one: StatefulSets with persistent volumes
  • Pattern two: don't put it in a container at all
  • Whichever pattern you pick, plan the failure case

Why state is the hard part

Containers were designed around statelessness: a container can be killed and rescheduled anywhere, at any time, and that's a feature, not a bug. It's what makes auto-scaling and self-healing work. State breaks that assumption. A database container that gets rescheduled to a different node needs its data to follow it, or a way to reconnect to storage that stayed put, and it needs that to happen without corrupting anything mid-write.

None of this is Worldstream-specific: it's the same trade-off anyone running containers has to make, on any infrastructure. The two established patterns for dealing with it are covered below.

Pattern one: StatefulSets with persistent volumes

Kubernetes has a purpose-built object for this: the StatefulSet. Unlike a regular Deployment, a StatefulSet gives each pod a stable, unique network identity and a stable reference to its own persistent storage, so when a pod is rescheduled, it comes back with the same identity and reattaches to the same volume instead of starting from a blank slate.

The storage side of that is handled through PersistentVolumes and PersistentVolumeClaims: a PersistentVolumeClaim requests storage, and a PersistentVolume (backed by whatever storage class your cluster has configured) fulfils it and stays bound to that specific pod identity across reschedules. This is the standard, well-established way to run something like a small database or a message queue inside Kubernetes when you've decided it needs to live there.

It's still more operationally involved than a stateless Deployment. Things like resizing a volume, running an orderly failover, or restoring a specific replica after a crash need more care with a StatefulSet than with stateless pods, and it's worth going in with that expectation rather than discovering it during an incident.

Pattern two: don't put it in a container at all

The other legitimate answer is to not containerise the stateful part. Not entirely: containers optimise packaging and deployment; VMs provide stronger default isolation and OS flexibility. Many teams combine both, VMs for the boundaries that matter, containers for the parts that benefit from speed and repeatable deploys.

For a lot of teams, that means running the stateless application tier in containers (on Kubernetes or otherwise) while the database sits on a VPS or dedicated server, managed the way databases have always been managed: with proper backups, monitoring, and someone who understands its specific failure modes. That's not a compromise, it's often the simpler and more reliable choice, particularly if your team doesn't have deep day-to-day experience running stateful workloads on Kubernetes. See Do containers replace VMs? Choosing the right isolation model for that decision in more depth.

Whichever pattern you pick, plan the failure case

Containers sharing the host kernel is also a security and compliance consideration worth factoring in for stateful, often sensitive workloads: hardening (running rootless, using seccomp and AppArmor/SELinux profiles), image scanning and signing, and, where the compliance requirement calls for it, running the container inside a VM for stronger isolation.

Regardless of which pattern you land on, the thing that actually determines whether a stateful service survives a bad day is whether backup and restore has been tested, not just configured. A backup you've never restored from is a hope, not a plan. For the storage side of that, see the Storage category for Block Storage and Backup Storage guidance.

Related articles

  • Do containers replace VMs? Choosing the right isolation model
  • Sizing a Kubernetes cluster for high availability
  • Storage overview
Was this article helpful?

Solid IT. No Surprises

Sparring partner for IT maturity
Eliminating barriers so you can run
Predictable and transparant costs

Contact

  • Industriestraat 53, Naaldwijk
  • Payment Methods
  • Abuse
  • Developers Resources
  • Network Operations Center
  • About us
  • Meet the team
  • Jobs
  • Become a reseller
  • Certifications
  • Our data centers
  • Our network
  • DDoS Protection
  • AMD EPYC servers
  • Technology Partners
  • Operating Systems
  • Overview
  • FAQ
  • Cases
  • News & Blogs
  • Use Cases
Nederlands
Deutsch
Español
Nederlands
Deutsch
Español
  • Legal
  • Disclosure