What deploying Strapi on Kubernetes involves and when teams choose it
This page covers how to run a Strapi 5 API and admin panel on a Kubernetes cluster you control: the build, the external database and upload storage, secrets, health probes on /_health, and how to roll out schema changes without breaking running pods. It is written for a team that already operates Kubernetes and wants Strapi on the same platform as its other services, not for a team choosing its first container platform. Strapi itself needs a Node.js runtime on an Active or Maintenance LTS version, a supported relational database such as PostgreSQL 14 or later, MySQL 8.0 or later, MariaDB 10.3 or later or SQLite 3 for development, and a place for uploads that survives pod restarts. Strapi 5 does not support MongoDB or other NoSQL databases, so the database decision comes first and shapes the cluster design.
Kubernetes adds value when the organization already has cluster operations, GitOps delivery, network policy, secrets tooling and monitoring in place, and wants Strapi to inherit them. It adds less when Strapi is the only workload, because a single VM with PM2 or a container host has fewer moving parts to patch. Before choosing, confirm who will own the cluster upgrades, the database backups and the image pipeline, and whether your platform team can supply an ingress, a persistent or object storage upload provider and a secrets store. Strapi's own deployment guidance and your cluster team should agree on these early, since each one changes the manifests.
Which Strapi on Kubernetes configuration choices fit which situation
This table compares the five decisions that shape a Strapi cluster: where Kubernetes runs, where PostgreSQL runs, how uploads are stored, how secrets reach the pods and how many replicas run. Read each row against your own team's operating capacity and compliance obligations, since every option moves some work onto your team. The main takeaway is that a managed control plane and an external managed database usually reduce what your team operates, while self-run options give more control at the cost of more on-call work.
| Decision | When it fits | Trade-off and what your team operates |
|---|---|---|
| Cluster: managed service | Your team wants to focus on Strapi and not on control plane nodes, and your cloud provider offers a managed Kubernetes service that meets your data location rules | Control plane upgrades and etcd backups are handled by the provider, but you still own node pools, add-ons, ingress, RBAC and version skew with your workloads |
| Cluster: self-run kubeadm, stacked etcd | You run your own data centers or private cloud, and a smaller cluster is enough for your environment | Control plane and etcd share nodes, so you run at least three control plane nodes with a TCP load balancer on port 6443, and you own etcd snapshots, restores and upgrades |
| Cluster: self-run kubeadm, external etcd | You need etcd isolated from control plane failures or want separate sizing for etcd, and you have the staff to run it | Adds a separate etcd cluster to certificate, backup and upgrade work; the Kubernetes docs recommend an odd member count, commonly five in production |
| PostgreSQL inside the cluster via an operator | Your platform team already runs stateful workloads on Kubernetes and has tested backup and restore for them | Your team owns storage classes, failover tooling, point-in-time recovery and major version upgrades; PostgreSQL does not detect primary failure on its own |
| PostgreSQL external (managed or VM-hosted) | Your organization already runs PostgreSQL outside the cluster, or your data rules require a database under a separate operations team | Strapi connects over the network with credentials stored as Secrets; you must confirm that the database supports PostgreSQL 14 or later, and that backups and failover are covered by the database owner |
| Uploads: provider plugin to object storage | You run several Strapi replicas, which need shared media, and you want files outside the pod filesystem | You configure an upload provider plugin and bucket access, set CORS for the bucket if needed, and manage bucket lifecycle, versioning and cost controls |
| Uploads: shared volume | Your storage team offers a ReadWriteMany volume and you prefer not to add an object storage integration | Volume performance, backup and access controls become your responsibility; confirm that your storage class supports the access mode before you scale replicas |
| Secrets: Kubernetes Secrets with encryption at rest | Your cluster already has encryption at rest for etcd and your RBAC limits who can list or watch Secrets | Secrets are stored unencrypted in etcd by default, so you must enable encryption at rest and restrict list and watch access; rotation is a manual process unless you automate it |
| Secrets: external store via Secrets Store CSI Driver | Your security team requires a central secrets manager with audit trails and rotation outside the cluster | Adds a driver, provider and mount configuration to each deployment; you operate the external store's access policies and troubleshoot mount failures during rollouts |
| Replica count | Traffic is light or you are still validating the setup, so one replica with a rollout strategy is enough for a first environment | Several replicas need shared uploads, shared sessions and a plan for schema migrations that run once per release; confirm these before scaling out |
How traffic, Strapi pods, uploads and PostgreSQL connect
The path starts with users and editors sending HTTPS requests to an ingress controller, which terminates TLS and forwards traffic to a Strapi Service. The Service routes to Strapi pods, which serve both the admin panel and the API from the same deployment. The pods connect outward to an external PostgreSQL instance and to an upload provider or object storage, crossing the trust boundary of the cluster. Secrets from a secrets source feed the pods at startup. Check that database and storage credentials reach only the pods that need them, and that the connections leaving the cluster are allowed by your network policy.
Request path and outbound connections for Strapi pods, with the cluster trust boundary.
Why the database and uploads belong outside the Strapi pods
Treat every Strapi pod as replaceable. Rollouts, node drains and autoscaling all create and destroy pods, so anything a pod writes to its own filesystem or holds in memory can disappear. The content database and uploaded media must live in services that outlive a pod restart, which means a managed or self-run PostgreSQL cluster and an object store or shared storage that every replica can reach. Strapi 5 supports PostgreSQL 14 or later, so confirm the major version you run is still supported against the PostgreSQL versioning policy before you commit to it. Also confirm which upload provider your team will configure, because a local upload directory inside a pod will lose files on the next rollout.
For PostgreSQL, plan high availability at the cluster level. A hot standby can serve read-only queries, and replication can be synchronous, where a commit waits for a standby, or asynchronous, where it does not. The trade-off is durability against write latency and the risk of losing recent commits on failover. PostgreSQL does not detect a failed primary or promote a standby by itself, so you need external failover tooling and a tested runbook. Connection handling matters just as much: each Strapi replica opens its own pool, and during a rollout old and new pods can briefly overlap. Put PgBouncer in front of the database and size the pool per replica with the total connection ceiling in mind, so a scale-out does not exhaust PostgreSQL's connection limit.
Finally, high availability is not a backup. Set up continuous archiving of write-ahead logs with a base backup so you can run point-in-time recovery to just before a bad schema change or a faulty migration. Ask the team responsible for the database to restore a copy into a separate environment and time it, because an archive that has never been restored is an assumption. Check that the Strapi media store has its own backup and versioning policy, since the database and the files must be restored to a consistent point together.
Deploying Strapi on Kubernetes step by step
This sequence takes a Strapi 5 project from version choice to a running admin panel and API on a cluster you control, with a check at each stage so the team knows each layer works before the next one depends on it.
Choose supported Node.js and PostgreSQL versions
The platform team and the Strapi lead agree on a Node.js release that is on Strapi's supported list (Active or Maintenance LTS) and a PostgreSQL version from the supported set (14 or later, with the support end dates in the PostgreSQL versioning policy checked against your go-live date). Record both in the project's engines field and the image base tag. Done when the versions are written into the build configuration and the team has confirmed the PostgreSQL end-of-life date falls after the planned operating window, which you should verify against the current policy rather than assume.
Build the image with native modules compiled in place
Create a multi-stage Dockerfile where the build stage runs npm install and the admin build, so native modules such as sharp compile for the architecture of the target nodes. The runtime stage copies only the built output and production dependencies. Build the image for the same CPU architecture as the cluster nodes, or use a multi-arch build. Done when the image starts locally with
npm run startagainst a test PostgreSQL instance and the admin build artifacts are present in the image.Set server URL and proxy settings for the ingress
Configure
config/server.jssourlmatches the public address, enable the proxy setting so Strapi trusts forwarded headers from the ingress controller, and set the application keys and admin secrets through environment variables. If the admin panel is served from another host, confirm the admin URL and CORS settings before the first deploy. Done when a request through the planned hostname returns the expected scheme and host in Strapi's logs and generated admin links.Create the external database and a least-privilege role
Ask your database team or the PostgreSQL owner to create a dedicated database and a role that owns only the Strapi schema, without superuser rights. Require TLS on the connection if your policy demands it. Keep the database outside the cluster or in a managed service you operate. Done when a test connection from a temporary pod using the new role succeeds and the same role cannot reach other databases on the server.
Store secrets in Kubernetes or an external store
Create Kubernetes Secrets for the database password, the Strapi app keys, the JWT and API token salts and the admin JWT secret. Confirm that encryption at rest is enabled for etcd, since Secrets are stored unencrypted in etcd by default, and restrict get, list and watch on these Secrets with RBAC. If the organization uses an external secret store, sync it through the Secrets Store CSI Driver instead. Done when
kubectl get secretreturns the expected keys and an RBAC check confirms that the Strapi service account cannot read other namespaces' Secrets.Define the Deployment with probes on /_health
Write a Deployment that references the image, injects the Secrets as environment variables, and sets liveness and readiness probes against the
/_healthendpoint on the Strapi port. Set a non-root security context consistent with the Pod Security Standards level your namespace enforces. Keep the replica count at one for the first start until migrations are confirmed. Done whenkubectl rollout status deployment/strapireports success andkubectl describe podshows both probes passing.Expose the Service and Ingress with TLS
Create a ClusterIP Service pointing at the Strapi port, then an Ingress that routes the public hostname and terminates TLS with a certificate from your certificate issuer. Set the upload body size limit on the ingress controller to match Strapi's upload settings. Done when `curl -I returns a valid certificate chain and a response from the Strapi server, which you confirm by checking the response headers.
Run the first start and confirm admin and API
Let the first start run Strapi's database initialization against the empty schema, then open the admin registration or login page and create the first administrator. Call one public content endpoint with a test API token and confirm the response shape matches the version you deployed. Schema changes should go through the release process described in the next topic, not through edits on the running pod. Done when the admin panel loads over the public hostname, the API returns a 200 response for the test request, and the pod logs show no migration errors.
Securing the cluster, secrets and pods that run Strapi
A Strapi pod is only as protected as the cluster that schedules it, the secrets it reads and the etcd store that keeps them. The cards below cover the controls to set on the cluster, the secret handling for Strapi's keys, and the pod settings to review before go-live. Work through them in order, because later controls depend on the cluster being authenticated and its data being protected.
Encrypt Secrets at rest in etcd
Kubernetes stores Secrets unencrypted in etcd by default, so anyone who can read the etcd data directory or a backup can read Strapi's database password and keys. Ask your platform team whether encryption at rest is configured for Secret resources on each control plane node, and confirm the key management approach with whoever owns the cluster. Then restrict list and watch verbs on Secrets to the service accounts that need them, because those verbs expose values to anyone who can use them.
Secrets good practicesUse an external secret store
If your organization already runs a vault or cloud secret manager, mounting Strapi's secrets through the Secrets Store CSI Driver keeps the source of truth outside the cluster. This suits rotation of APP_KEYS, JWT_SECRET, ADMIN_JWT_SECRET and database credentials without rebuilding the image. Confirm the provider you need is supported by the driver version your cluster runs, and decide who can change the secret in the external store.
Authenticate operators with OIDC
Kubernetes does not manage human users as API objects, so cluster access depends on the authentication method you configure, such as X.509 client certificates, bearer tokens including OpenID Connect and JWT, or webhook token authentication. Prefer an identity provider with short-lived tokens for people who deploy Strapi, and keep client certificates for break-glass access. Confirm which methods your distribution enables and who holds the cluster-admin role.
Kubernetes authenticationApply Pod Security Standards to the namespace
Label the namespace that runs Strapi with the Pod Security Standards level you choose, and set the Strapi container to run as a non-root user with privilege escalation disabled. Strapi writes uploads and logs, so mount writable paths explicitly rather than relaxing the root filesystem setting for the whole pod. Test the restricted profile in a staging namespace first, because the Strapi image and any sidecars may need small changes to pass admission.
Pod Security StandardsBack up etcd with snapshot save
Strapi's Secrets and deployment objects live in etcd, so an etcd backup is part of your Strapi recovery plan even if the database is backed up separately. Take snapshots with etcdctl snapshot save on a schedule, store them off the control plane, and record which etcd members and certificates they require. Restore planning should use etcdutl, and your team should rehearse a restore in a test cluster before relying on it.
Inject Strapi keys from secrets
Strapi's APP_KEYS, JWT secrets and the admin URL settings must be supplied at runtime from Kubernetes Secrets or ConfigMaps, not written into the Docker image or committed to the repository. Baked-in keys are visible to anyone who can pull the image, and rotating them then requires a rebuild. Confirm each key is set for every replica so sessions and tokens validate across pods, and document who may rotate them and how existing tokens are handled.
Rolling out Strapi schema changes without breaking editors
Content type changes in Strapi 5 can apply database schema migrations when an instance starts, so a Kubernetes rolling update across several replicas needs a fixed order rather than a default one. Plan the release so that a verified database backup is taken before any new image starts, then let a single pod run first so that exactly one process applies the migrations. Confirm the result before the other replicas move: check that the new pod passes its /_health readiness probe, that the content types in the admin panel match the release notes, and that a representative list and detail request returns the expected fields. Only then should the Deployment roll the remaining replicas. Where the migration is large, confirm with your team whether a Job or a canary pod is the cleaner way to run that first step, and make sure a second replica cannot start the same migration in parallel.
Plan the rollback path before the release, because Strapi's migration guidance does not support downgrading a database after a Strapi 5 start. The practical rollback is to stop the rollout, scale the new Deployment down, and restore the database from the pre-release backup, then redeploy the previous image tag. This means the backup has to be tested as a restore, not only taken, and the restore time should be measured against the editorial freeze you are willing to accept. Editors who saved content between the backup and the rollback will lose that content unless you agree on a write freeze or a content export in advance. Record the image tags, the Helm values or manifests and the backup identifier together so that the rollback can be run from a runbook.
If the cluster itself is upgraded in the same window, sequence the two changes separately. Kubernetes requires kube-apiserver to be upgraded one minor version at a time and before the control plane components and kubelets, and kubelets may be up to three minor versions behind kube-apiserver under the version skew policy. A node upgrade that moves pods while a schema migration is half complete makes failure harder to diagnose, so most teams avoid combining them. Check the Strapi version against the Node.js and database versions it supports, and confirm your cluster version against the current support window on the Kubernetes release pages before you choose a date. If the two changes must share a window, agree on which one goes first and on the stop conditions for each.
Limits to confirm before you commit to this design
A Strapi on Kubernetes design rests on version windows that move on their own schedules: the Strapi release line, the Kubernetes minor versions, the PostgreSQL major version and the cluster topology. Confirm each item below with the vendor or your platform team before you commit, because a design that is correct today can fall out of support before go-live.
Strapi version and release cadence
Strapi 5 minor releases ship roughly weekly, so the version you test is not automatically the version you deploy. Pin an exact Strapi version in your lockfile and image build, and decide how often you will test and promote a new minor release. Check the release notes for each candidate before you adopt it, especially where a change touches schema, plugins or the database. Confirm with your Strapi team how long you intend to stay on each pinned version.
- Minor release pace
- Weekly
Kubernetes version support window
The Kubernetes project maintains only the three most recent minor releases, so a cluster on an older minor version has no upstream patches. As of September 2026, the supported minors were 1.37, 1.36 and 1.35, with end-of-life dates listed on the release page. Confirm which minor version your managed service or distribution runs, when your provider retires it, and whether your provider's extended support matches the upstream dates.
Kubernetes releasesKubernetes version skew during upgrades
The version skew policy requires the kube-apiserver to be upgraded one minor version at a time, and kubelets may run up to three minor versions behind the API server. That means a control plane upgrade must be planned in steps, and node pools can lag for a while. Confirm your provider's node upgrade method, whether it drains nodes safely for Strapi pods, and how long your change window allows for the full sequence.
Version skew policyPostgreSQL support window
Strapi 5 supports PostgreSQL 14 or later, and PostgreSQL 14 is supported only until November 12, 2026. If you start a build on 14 now, you will need a major upgrade before the window closes, which means a planned dump and restore, pg_upgrade or logical replication run. Confirm which major version your managed or self-run database uses, and whether a newer major version has been validated against your Strapi release.
- PostgreSQL 14 end
- Nov 12, 2026
Chosen HA topology and recovery targets
Kubernetes control plane HA needs at least three control plane nodes behind a TCP load balancer on port 6443, with either a stacked etcd or an external etcd cluster. PostgreSQL does not detect primary failure or promote a standby by itself, so automatic failover requires external tooling you must choose and test. Confirm your recovery time and recovery point targets, then check that the etcd backup plan, the database failover method and the upload storage design meet them.
kubeadm HA guideStrapi edition and paid features
Strapi Community Edition is MIT Expat licensed, but audit logs and review workflows are Enterprise features, and SSO for the admin panel is an add-on on Growth and included in Enterprise. If your compliance team needs audit trails or corporate admin login, the plan you buy affects your Kubernetes design, not just your license. Confirm the required features with Strapi sales, check whether any code under ee directories is in your build, and record the decision before you write your deployment manifests.
Self-hosted pricingQuestions buyers ask before hiring help with Strapi on Kubernetes
What makes the work take more or less effort?
Effort depends mostly on how mature your cluster and database operations already are, not on Strapi alone. The main drivers are the number of environments (development, staging and production each need their own secrets, database and ingress), whether PostgreSQL is already run as a managed or highly available service, where uploads go (a provider such as object storage versus a shared volume), how secrets are managed, and how often you expect to ship schema changes. Each added environment and each storage choice adds configuration and testing. Ask any partner to break its quote down by these drivers so you can see which ones you control.
Can our team deploy Strapi on Kubernetes without outside help?
Yes, if your team already runs Kubernetes and PostgreSQL in production and has people who can own the work. Two owners matter most: one for the container image (the npm build, native modules such as sharp, and the admin URL set at build time) and one for schema releases, since Strapi 5 runs data migrations on first start and downgrades are not supported. Without a named owner for each, changes tend to stall or reach production untested. If you are newer to Kubernetes, an outside review of the design before you build is often the cheaper option.
What do we need to provide before the work starts?
You provide the inputs the deployment depends on:
- Cluster access with rights to create namespaces, deployments, services, ingress and secrets in the target environments
- A PostgreSQL database (Strapi 5 supports PostgreSQL 14 or later) with credentials, backups and network access from the cluster
- Object storage or another upload provider, and a decision on how media is served
- DNS records, TLS certificates and the public hostnames for the API and, if separated, the admin panel
- Decisions on administrator sign-in (SSO or local accounts) and who manages secrets
- A change window for the first production rollout and for each later schema release
How long does a Kubernetes deployment of Strapi take?
The timeline depends on the scope you agree, so it is best stated qualitatively: a single environment with a ready cluster and database takes much less time than a multi-environment rollout with new database, storage and identity decisions. Waiting on your approvals, cluster access and certificate issuance often sets the pace more than the Strapi work does. DeployOpen agrees the scope, deliverables and timeline in writing before work starts, so ask for the timeline in that written scope rather than relying on general estimates.
What recurring costs should we expect after go-live?
Recurring costs are the ones you keep paying after the first deployment. They usually include the Kubernetes cluster (control plane or managed service, worker nodes and load balancers), the PostgreSQL database and its replicas, object storage for uploads, backup storage and restore testing, and DNS and certificate services. If you need administrator SSO on the self-hosted Community Edition, the Strapi self-hosted pricing page lists SSO as a Growth add-on, with audit logs and review workflows on Enterprise. Maintenance is also recurring: Strapi 5 minor releases ship roughly weekly, and Kubernetes and PostgreSQL each need upgrades on their own cycles. Ask any quote to separate one-time setup from these monthly and annual items.
Does DeployOpen issue compliance certificates for our Strapi platform?
No. DeployOpen prepares systems, controls and evidence for compliance assessments, such as configuration records, access settings, backup and restore evidence and deployment procedures. Independent auditors and certification bodies issue audit reports, attestations and certifications. Ask your auditor early which evidence they will request, so the deployment can capture it from the start.
What goes wrong most often when Strapi runs on Kubernetes?
The most common problems come from configuration rather than code. Teams often bake the wrong admin or public URL into the image, run more than one replica before sharing sessions and uploads correctly, leave health probes pointed at the wrong path, or store secrets unencrypted in etcd without encryption at rest or tight RBAC. Schema changes are another frequent source of trouble when they reach production without a database backup and a rehearsal on a copy of production data. Ask a partner how it will test each of these before go-live.
How DeployOpen scopes, builds and supports Strapi on Kubernetes
DeployOpen plans and deploys self-hosted Strapi on Kubernetes in infrastructure you control, from the image build and external database to probes, secrets and schema rollouts. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
How we scope
- Inventory your target cluster, distribution, namespaces, ingress and the database and upload provider Strapi will use.
- Confirm the Strapi version, Node.js version and whether you will run schema changes through pipelines or the admin panel.
- Agree in writing which secrets, probes, replicas and migration steps are in scope before any work starts.
How we build
- Build the npm and native module steps into a reproducible image, then check it against your cluster's architecture.
- Configure the external PostgreSQL connection, upload provider, health probes on /_health and secret delivery from your store.
- Test a schema change in a staging namespace with a database backup taken first, then document the rollout order.
How we hand over
- Deliver manifests or charts, build pipeline definitions and an operations runbook tailored to your environment.
- Document the restore procedure for the database and uploads, and record which steps your team must repeat for each release.
- Walk your platform and Strapi teams through the rollout, rollback and probe behavior, and record open items.
How we support
- Support is available as a retainer for Kubernetes version tracking, Strapi minor upgrades and recurring security testing.
- Retainer scope, response expectations and the cadence of upgrade reviews are agreed in writing before the retainer starts.
- Each upgrade is tested on a copy of your environment, with the database backup and rollback path confirmed beforehand.

