Deploying HAPI FHIR on Kubernetes with the Helm chart: when teams choose it
A platform or infrastructure team that must run a HAPI FHIR JPA server inside its own Kubernetes clusters can deploy the starter with the Helm chart maintained in the hapi-fhir-jpaserver-starter project. The chart is one of several paths the project documents, alongside the hapiproject/hapi Docker image, Docker Compose, Spring Boot, and a WAR on Tomcat, Jetty or Wildfly. Choose it when your organization already runs Kubernetes, when your platform team owns ingress, secrets, autoscaling and monitoring through the same tooling as other services, and when you expect to run several environments (for example, test, validation and production) from one set of versioned values files. If your team has no Kubernetes operations experience, or the server is the only workload you would run on the cluster, a container host or a WAR on an existing application server is often easier to operate. Those choices are covered in the sibling sections of this page.
The server needs a database, and that choice comes first. The starter defaults to an embedded H2 database, which is suitable for trials only. For production, use PostgreSQL or Microsoft SQL Server. MySQL is not supported. You can run the database inside the cluster through the chart's bundled option or connect to an external database service. Your decision depends on who backs up, patches and restores the database, and on whether your database platform team already has tested procedures for those tasks. Confirm in the chart's values file which keys control the bundled database and the external connection, and whether the chart creates the database credentials or expects them in a secret you supply.
Pin the chart version and its image tag together, then confirm the exact value names, defaults, and the Java and FHIR settings they produce against that pinned version before you write your values files. Chart keys and defaults change between releases, so a values file copied from an older example can silently change storage, probes or ports. Ask your HAPI FHIR support provider or review the chart's own documentation and release notes for the version you plan to run. Also check that your cluster version is within the Kubernetes versions the project currently maintains, as listed on the Kubernetes releases page.
Which chart settings change risk, cost and operations
This table compares the chart value decisions that shape risk, cost and day-two operations for a HAPI FHIR deployment on Kubernetes. Read each row as a question to settle before go-live, then look up the named setting in the README for the chart version you pin. The main takeaway is that the database source, secret handling and replica settings matter more for production than the default values the chart ships with.
| Setting area | What it affects | When it fits and what to confirm |
|---|---|---|
| Database source (bundled or external) | Data durability, backup ownership, upgrade sequencing and who restores after a failure | A bundled database suits evaluation only, while an external PostgreSQL service fits production if your database team already backs it up. Confirm the database value keys and supported PostgreSQL versions in the chart README |
| Secret source | Where database credentials and FHIR server secrets are stored and who can read them through the Kubernetes API | Use an existing Secret reference or an external secret store for production. Confirm the secret name keys and whether the chart creates secrets or only reads them |
| Ingress and TLS | Public base address, certificate handling and whether clients reach the server through the cluster edge | Set the public address that clients see so links and Bundle entries resolve correctly. Confirm the ingress class, host and TLS secret keys, and how the chart expects certificates to be issued |
| Resource requests and limits, or presets | Scheduling guarantees, memory pressure on the JVM and the risk of eviction under node contention | Explicit requests and limits fit production sizing from load tests. Presets fit early testing only. Confirm the resources keys and the preset names in the pinned chart |
| Replica count | Availability during node drains and per-instance caches or batch job behavior | Start with more than one replica only after the database and any shared state are confirmed for multiple instances. Confirm the replica key and session or caching notes in the README |
| Pod disruption budget | How many pods can be voluntarily evicted during node upgrades and cluster maintenance | Enable it when running multiple replicas so maintenance does not remove every instance at once. Confirm the budget key and whether it is on by default in your chart version |
| Metrics export | Whether Prometheus can scrape the server and which endpoints and labels are exposed | Enable it before go-live so monitoring exists from the first deployment. Confirm the metrics or ServiceMonitor keys, the scrape path and any authentication needed for the endpoint |
Bundled or external PostgreSQL: choosing the database path
A bundled database is a PostgreSQL instance that the chart deploys alongside the HAPI FHIR server. It is usually the fastest path to a running environment for evaluation and small deployments, because the chart creates the database, its service and its storage claim in one release. The trade-off is that the chart provisions the database but does not run it as a managed service. Your platform team owns the operational work that follows.
- Backups: The chart does not give you a tested backup and restore process for FHIR data. Your team must define the schedule, retention, off-cluster copies and restore tests.
- Patching and upgrades: Your team decides when to move the database image or chart version, and plans the maintenance window with the HAPI FHIR upgrade path in mind.
- Failover: A single bundled instance does not provide automatic failover unless you deploy and configure a high availability design yourself.
- Storage growth: Your team watches volume usage, resizes persistent volumes where the storage class allows it, and plans for growth from the HAPI FHIR schema and resource history.
- Credentials: The chart generates or accepts database credentials through Kubernetes Secrets, which you should manage with encryption at rest and least-privilege RBAC.
Before choosing this path, confirm the bundled database's version and support status in the chart documentation, and confirm that the version is supported by the HAPI FHIR release you plan to run.
An external database runs outside the release, either as a managed PostgreSQL service in your cloud account, a PostgreSQL cluster run by a database team, or a Microsoft SQL Server instance where your organization requires it. The chart connects to it through a host, port, database name and credentials. This path separates the FHIR server lifecycle from the database lifecycle, which suits organizations that already operate database platforms with defined recovery objectives. The HAPI FHIR JPA starter supports PostgreSQL and Microsoft SQL Server for production and does not support MySQL.
- Backups and recovery: The database owner typically controls point-in-time recovery, snapshots and restore testing. Confirm that these cover the HAPI FHIR schema and that restores have been rehearsed.
- Patching and failover: The database team handles minor patches and failover according to the service design. Confirm the failover behavior and how the application reconnects.
- Storage growth: Capacity planning sits with the database owner, but the FHIR team must share expected resource volumes and history growth.
- Network and TLS: Your team configures network paths, firewall rules and encrypted connections between the pods and the database.
- Credentials: Pass the connection details to the chart through Kubernetes Secrets or an external secrets store, such as the Secrets Store CSI Driver, so that passwords do not sit in values files.
The chart will not create or back up an external database, so confirm the database owner, the restore procedure and the credential rotation process before installation.
The practical difference between the two paths is who answers when the database misbehaves at 2 a.m. Both paths carry the same technical duties, but the bundled path places them on the platform team, while the external path places them on whichever team runs the database service. Write the split down before installation, because gaps usually appear during the first restore test or the first storage alert.
- Ownership matrix: List backups, restore tests, patching, failover, storage growth, monitoring and credential rotation, and name one owner for each.
- Recovery objectives: Agree the recovery point and recovery time targets with the business owner of the FHIR data before choosing the path.
- Monitoring: Confirm who receives database alerts and how they connect to the Prometheus setup for the HAPI FHIR server.
- Change control: Decide which team approves database upgrades that could affect the HAPI FHIR schema migration.
- Exit path: Record how the data would move if you later switch from bundled to external, or the reverse.
Request the responsibility matrix from any managed database provider in writing, and compare it against your internal runbook before signing off on the database path.
How the HAPI FHIR chart's parts connect inside the cluster
The diagram starts with clients calling the FHIR endpoint through the ingress, where TLS is terminated and public certificates are handled. Traffic then reaches the HAPI FHIR service and its pods, which read database credentials from a Secret and connect to either a bundled PostgreSQL or an external database outside the cluster. Check that the database crossing is encrypted, that the Secret is protected at rest, and that Prometheus can reach the metrics endpoint on each pod.
Request, database and monitoring paths for the HAPI FHIR chart in one cluster.
Installing the chart in the right order
This sequence moves from version checks and cluster access through secrets and a pinned values file to a verified HAPI FHIR server reachable over TLS. Each step closes with a check so problems surface before the chart is live.
Confirm Kubernetes and HAPI FHIR version compatibility
The platform team checks the target cluster's Kubernetes minor version against the project's list of supported releases and against the requirements in the chart's documentation. In parallel, the application owner confirms which HAPI FHIR version the chart's image will run and that its Java requirement is met, since HAPI FHIR 8.2.0 requires JDK 17. Record both versions in the change request. Done when the team can name a Kubernetes minor version that is still under project support, and a HAPI FHIR release whose Java requirement matches the image. Confirm the chart's own Kubernetes requirements with the chart maintainers before you go further.
Prepare the namespace and cluster access
The cluster administrator creates a dedicated namespace for the FHIR server and grants the deploying account only the permissions it needs in that namespace through RBAC. Kubernetes authenticates users with client certificates, bearer tokens or an external identity provider, so confirm which method your team uses and that the deploying identity is not a shared administrator account. Apply resource quotas and labels for ownership and cost tracking if your platform uses them. Done when a test command such as listing pods in the namespace succeeds for the deploying identity and fails in other namespaces.
Create the database and its credentials outside the chart
The database administrator creates a PostgreSQL or Microsoft SQL Server database and a dedicated login for HAPI FHIR, outside the Helm release, so the database lifecycle, backups and credential rotation are not tied to chart upgrades. Grant the login the rights the JPA server needs to create and migrate its schema, and no broader rights. Confirm that the starter does not support MySQL before choosing the engine. Done when a connection test from a workstation or debug pod using those credentials succeeds, and the host, port and database name are written into the deployment record.
Create Kubernetes Secrets for application and database values
The platform engineer creates one Secret for database credentials and one for any application secrets, such as an OAuth client secret or an admin token, using kubectl create secret or a secrets manager integration. Kubernetes stores Secrets unencrypted in etcd by default, so confirm that encryption at rest is enabled on the cluster and that RBAC prevents list and watch access for people who do not need it. Reference the Secrets from the values file by name rather than pasting values into it. Done when
kubectl get secretshows the objects exist and the values file contains no passwords.Write the values file with pinned versions
The engineer writes a values file that sets the image tag to an explicit HAPI FHIR release, pins the chart version, points the chart at the external database or enables the bundled one for non-production use only, and references the Secrets created earlier. Set resource requests explicitly for production instead of relying on presets, and set the public base URL that the ingress will serve. Store the file in version control. Done when the file has no floating tags such as latest, every image and chart version is explicit, and a peer review has confirmed the database mode and ingress host.
Run a dry run and template render
The engineer renders the chart locally with helm template using the pinned values file and reviews the output for the image, environment variables, Secret references, probe paths, ingress host and any PodDisruptionBudget. A server-side dry run against the cluster, using helm install with the dry-run option, then confirms the API objects are accepted by the cluster. Look for unexpected cluster-scoped resources. Done when the rendered manifests match the values file, no Secret value appears in the output, and the dry run completes without validation errors.
Install the release and watch readiness during schema creation
The engineer runs helm install into the prepared namespace and watches the pods with kubectl get pods and kubectl describe. On first start, the JPA server creates or migrates its schema, so the pod may run for a while before it is ready. Expect the readiness probe to fail until that work completes, and check the logs for database connection or migration errors rather than restarting the pod repeatedly. Done when the pod reports ready and the logs show the server has started without schema errors.
Verify the CapabilityStatement, TLS and metrics endpoints
Using an external client, the engineer requests the metadata endpoint at the public address through the ingress, for example a GET to the metadata path under the server base URL, and confirms it returns a CapabilityStatement with the expected FHIR version. The engineer also confirms the certificate is valid for the host name and that plain HTTP is redirected or refused. Finally, the monitoring team scrapes the metrics endpoint from Prometheus and confirms the target is up. Done when the CapabilityStatement loads over HTTPS, the certificate chain validates, and the Prometheus target shows as up.
Secrets, ingress and access controls to set before go-live
The Helm chart gets HAPI FHIR running, but the controls around it decide whether patient data is protected. The cards below cover where credentials live, how traffic reaches the server, how pods are constrained, how the database is isolated and which security duties stay with your team.
Kubernetes Secrets at rest
Kubernetes stores Secrets unencrypted in etcd by default, and the HAPI FHIR chart places database credentials and other sensitive values in them. Before go-live, confirm that encryption at rest is enabled for the API server, restrict list and watch access on Secrets with least-privilege RBAC, and decide whether an external store fits better through the Secrets Store CSI Driver. Check who can read Secrets in the namespace, including CI service accounts.
Secrets good practicesIngress and TLS certificate renewal
TLS should terminate at a controlled ingress or load balancer in front of the HAPI FHIR service, with certificates issued and renewed by an automated process. Confirm the public server address matches the external hostname so that links and Bundle entries use HTTPS. Test renewal before expiry and confirm who is alerted when a certificate fails to renew.
Pod security aligned with standards
Run the HAPI FHIR pods under the Pod Security Standards level your cluster enforces, normally the restricted profile where the image allows it. Check that containers do not run as root, disallow privilege escalation, drop unneeded Linux capabilities and use a read-only root filesystem where the application permits it. Confirm these settings in the chart values and test them in a staging namespace before production.
Pod Security StandardsNetwork policy to the database
Only the HAPI FHIR pods should be able to reach the PostgreSQL or SQL Server endpoint, and only on its database port. Define network policies that allow ingress to the FHIR pods from the ingress controller and monitoring scrapers, and allow database egress only from those pods. Confirm your cluster's network plugin enforces network policy, because the policy has no effect otherwise.
Authorization, consent and audit
HAPI FHIR does not supply a single security layer. Authorization through the AuthorizationInterceptor, consent and search narrowing, and BALP audit logging must be configured in the application and then tested separately. Ask your security team to verify that unauthenticated requests are refused, that users see only permitted resources and that audit events are written and retained. Treat the chart defaults as a starting point, not a finished control set.
HAPI FHIR security docsResource requests, disruption budgets and Prometheus monitoring
Chart presets are a starting point, not a sizing decision. Explicit resources.requests and resources.limits on the HAPI FHIR pods tell the scheduler how much CPU and memory each replica needs and cap what one pod can take from its node, which is how the platform team controls placement and limits noisy-neighbor risk. The right values depend on dataset size, search load and the JVM heap you set for the server, and none of them can be taken from a generic table. Measure them in your environment: load test with your own resource shapes, search mix and data volume, watch heap and garbage collection under sustained traffic, and set requests from observed steady-state use with limits that leave headroom for bursts. Confirm with your cluster team how memory limits interact with the JVM heap setting so the container is not killed by the kernel during a large search or bulk operation.
A pod disruption budget keeps voluntary disruptions, such as node drains during cluster upgrades, from taking too many HAPI FHIR replicas offline at once. Set it in the chart values and check that the budget is compatible with your replica count and scheduling constraints, so that a drain can still proceed. Replica count alone does not give availability, though. If the PostgreSQL database behind the server is a single instance, every replica fails together when that database fails, and a drain that removes the database node stops the whole API. Treat the database tier, its backups and its own failover as part of the availability design, and confirm which database option (bundled or external) the chart is using before you size the disruption budget.
Prometheus reads the server's metrics endpoint on a schedule, so the chart's monitoring settings must point Prometheus at the correct port and path in your cluster. Write alert rules for three signals: readiness failures across replicas, the HTTP error rate on FHIR requests, and database connection pool use, since a pool at its ceiling shows up as slow or failing requests before anything else. Set thresholds and evaluation windows from the load test results rather than from defaults, and route alerts to the team that owns the database as well as the application. Confirm the metric names exposed by your deployed version against its documentation before writing rules, because dashboards and alerts built on names that have changed will silently stop firing.
Limits to confirm in your own environment
The chart automates much of the install, but it does not decide your versions, database policy, cluster support window or security posture for you. Each card below names one thing to confirm before rollout, so the Helm values you pin match the environment you actually run.
Chart version matches HAPI FHIR release
Check which chart version packages the HAPI FHIR release you intend to pin, and confirm that release's Java requirement. HAPI FHIR 8.2.0 requires JDK 17, so the image the chart pulls must provide that runtime. Record the chart version, image tag and HAPI FHIR version together in your change record so a rollback returns to a known pairing.
HAPI FHIR versionsBundled database meets policy
The chart can deploy a bundled PostgreSQL, but many organizations require a managed or separately operated database with defined backup, restore testing and patching. Ask whether the bundled instance has persistent storage, tested backups and an owner who will handle major upgrades. If it does not meet your policy, plan an external PostgreSQL connection and a secret for its credentials.
Cluster version in supported set
Confirm that your cluster's Kubernetes minor version is still maintained on the day you roll out, because the project supports only the three most recent minor releases. Check the dates on the releases page and plan an upgrade before the end-of-life date. Your version skew, kubelet versions and node pools should also be checked against the project's skew policy.
Kubernetes releasesSchema migration on upgrade
Find out whether the chart runs database schema migration as part of the server pod startup or as a separate job. A startup migration can delay readiness and may run from several replicas at once, while a separate job gives you a single controlled step. Confirm the order of operations for upgrades, the rollback story if a migration fails, and the database backup taken before each change.
Ingress supports FHIR TLS and headers
Verify that your ingress controller can terminate TLS, forward the original host and scheme, and pass through the headers FHIR clients depend on, including ETag and CORS handling for browser applications. Also confirm the public server address the chart sets, so links and Bundle entries reference the external hostname. Test with a real client before go-live rather than relying on a default ingress manifest.
Chart does not replace readiness work
The chart installs the server but does not satisfy the production checklist for the starter. Security layers, audit logging, subscription scaling, monitoring, backups and support remain your work. Treat the chart as the deployment mechanism and the readiness checklist as the acceptance list, and assign an owner to each open item before the first patient or partner data arrives.
Starter repositoryWhat buyers ask before deploying HAPI FHIR on Kubernetes
How much does a HAPI FHIR deployment on Kubernetes cost?
The cost comes from four components: the cluster capacity the server and database consume, database operations, storage, and the staff time spent on configuration, security testing, upgrades and monitoring. Cluster and storage charges recur monthly and depend on your cloud or data center pricing, while configuration, security testing and the first deployment are one-time costs. Ask any quote to separate these lines, to state who pays for each (your team, your cloud provider, or DeployOpen under a written scope), and to list which recurring items, such as upgrades and monitoring, are covered by a retainer. DeployOpen does not publish a price list, so the quote follows from the agreed scope.
How long does a HAPI FHIR Helm deployment take?
Duration depends on how much of the environment already exists and how many decisions remain open. The main drivers are whether a Kubernetes cluster, ingress, TLS certificates and a PostgreSQL service are already in place, whether the team has settled on an identity provider and secrets store, how much security review the server needs, and how many change windows your organization requires. Because no duration is fixed in advance, ask for a timeline in the written scope that lists each phase, the client dependencies in each phase, and the acceptance tests that close it.
What does our team need to provide for the engagement?
Plan for four inputs before work starts:
- Cluster access in the namespaces and cloud accounts or data centers where the server will run, with rights to create secrets, ingress and monitoring objects.
- Decisions on the database (bundled or external PostgreSQL), the identity provider, and where secrets will be stored.
- A named FHIR data owner who can approve the resource types, implementation guides and access rules.
- Change windows for installation, upgrades and any cutover from an existing system.
Can our own team deploy HAPI FHIR on Kubernetes without help?
Many platform teams can install the chart with a basic values file, but a production setup involves more than the install itself. Teams most often need help with external PostgreSQL configuration, secret encryption and access control in the cluster, TLS and ingress design, the access model for patient data, and the audit and monitoring setup that compliance teams will review. Assess your team by asking whether it has run stateful databases on Kubernetes, managed Kubernetes secrets with encryption at rest, and tested restores. Gaps in those areas are where outside help usually adds value.
Does the Helm chart alone make HAPI FHIR production ready?
No. The chart installs and configures the server, but it does not decide your security model, your audit logging, your backup and restore process, or your upgrade policy. HAPI FHIR itself states that it does not provide one security layer and offers building blocks such as the AuthorizationInterceptor and BALP audit logging, which you must configure and test. Treat the chart as the starting point and review the production readiness checklist for the starter before go-live, including pod disruption budgets, resource requests, and Prometheus alerts.
How do HAPI FHIR and Kubernetes upgrades affect the deployment?
Two upgrade paths run in parallel. HAPI FHIR releases can change the JPA schema, the Java requirement and the configuration keys, so each version needs its own upgrade review and a database backup before the change. For example, HAPI FHIR 8.2.0 requires JDK 17, so the container image and Java runtime must match the chart values you deploy. Kubernetes minor versions are supported for a limited period, and the version skew policy requires the API server to be upgraded one minor version at a time, before the kubelets. Ask for a written plan that covers both paths, test upgrades in a non-production cluster first, and confirm which upgrade work a retainer covers.
Who owns the security of the Kubernetes layer around HAPI FHIR?
Your organization owns the cluster, its identity integration and its data, and any engagement should state that ownership in writing. Kubernetes stores Secrets unencrypted in etcd by default, so encryption at rest, least-privilege RBAC and possibly an external secrets store must be configured. DeployOpen can plan, implement and harden these controls and prepare the evidence a compliance team will ask for, but it does not issue audit reports or certifications. Independent auditors and certification bodies perform those assessments, and your compliance lead should confirm which evidence they need before scoping begins.
How DeployOpen scopes and delivers a HAPI FHIR Kubernetes deployment
DeployOpen plans, builds, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure, including the cloud accounts, data centers or air-gapped networks where a HAPI FHIR server must run. For a Kubernetes deployment with the Helm chart, the work starts with a written scope that fixes the cluster, database, identity, network and monitoring boundaries before any values file is changed.
How we scope
- Engagements are fixed-scope, with the cluster, database, ingress and monitoring boundaries agreed in writing before work starts.
- We confirm your Kubernetes distribution, version support window and whether PostgreSQL or Microsoft SQL Server is bundled or external.
- The written scope lists the FHIR versions, enabled modules and security controls that the Helm release must carry into production.
How we build
- We set up Helm values for secrets, ingress and TLS, resource requests and pod disruption budgets against your cluster policies.
- Each release is tested for startup behavior, schema migration, probe timing and rolling restarts before it reaches a production namespace.
- Prometheus scrape configuration and alert rules are built and checked against the metrics the HAPI FHIR server exposes.
How we hand over
- You receive the chart version, values files, manifests and a runbook covering install, upgrade, rollback and secret rotation.
- Documentation records the evidence your security and compliance teams need, such as RBAC bindings, encryption settings and backup checks.
- A handover session walks your platform engineers through the deployment so they can operate it without us.
How we support
- Ongoing support, chart upgrades and continuous testing are available as retainers after handover.
- Upgrade plans cover Kubernetes version skew, Java requirements and HAPI FHIR release changes before each rollout.
- Post-change retesting confirms that ingress, TLS, probes and monitoring still behave as documented after each upgrade.

