How to upgrade OpenSearch clusters managed by the Kubernetes operator
If your team runs OpenSearch on Kubernetes and needs to move to a newer version, the operator does most of the sequencing for you, but only within limits you need to plan around. The upgrade starts when general.version changes in the cluster spec. The operator then restarts nodes one by one and waits for green cluster status after each node before it moves on. Downgrades are not supported, and neither is an upgrade that skips more than one major version. Before you edit the spec, confirm the current and target versions, and plan a path through each intermediate major release if you are behind. The operator's cluster operations documentation is the reference for the exact behavior of your operator release.
Choose your target version against the OpenSearch maintenance policy. Each version stays under maintenance until the next major version enters maintenance or one year passes, whichever is longer. During maintenance, the project ships bug fixes and security patches but no new features. Version 1 reached end of life on May 6, 2025, and version 2 is maintained through the 4.0 GA release. Check the OpenSearch releases page for the current status of each line before you pick a target, because a version that is still supported today may leave your cluster unpatched if your upgrade takes longer than your window.
This page covers the operator path only. Other upgrade methods, including manual rolling upgrades outside Kubernetes, snapshot and restore into a new cluster, and Migration Assistant, have different risk profiles and are covered in the sibling pages of this upgrade set. Confirm with your platform team whether your data nodes use emptyDir storage, because that changes what the operator needs before any restart begins, and confirm that your backups and snapshot repository are verified before the first node restarts.
What changes in the operator-managed upgrade and what it means for you
This table compares each operator behavior that affects an upgrade with its practical impact and the action your team needs to take. Read each row before changing general.version, and confirm the exact behavior against the operator documentation for the operator release you run.
| Behavior | Impact on your upgrade | Action needed |
|---|---|---|
| Changing general.version triggers rolling restarts | The operator restarts nodes one at a time, so each node leaves and rejoins the cluster during the upgrade window. | Confirm the restart sequence in the operator docs for your release and schedule the change in a maintenance window. |
| Operator waits for green after each node | Progress depends on cluster health, so a yellow or red cluster can stall the upgrade between nodes. | Check cluster health and shard allocation before starting, and watch for a stalled rollout. |
| No downgrades | Once a node runs the new version, you cannot roll the cluster back by changing the spec to the older version. | Take and verify snapshots before the change and test the restore path in a non-production cluster. |
| No upgrades across more than one major version | A jump such as 1.x to 3.x is not supported through the operator, so the path must be staged. | Map your current and target versions and plan intermediate major upgrades, or use a different migration method. |
| general.drainDataNodes must be true for emptyDir data nodes | Data nodes on emptyDir storage lose local data when pods are removed, so drain behavior protects shard data during restarts. | Set general.drainDataNodes to true for those node pools and confirm the setting in your release's operator docs. |
| Bug and security fixes only during maintenance | A version in maintenance receives fixes but no new features, so it remains supported for patching while newer minors ship. | Track the maintenance status on the OpenSearch releases page and plan upgrades before end of life. |
| Version 2 maintained through the 4.0 GA release | Version 2 keeps receiving bug and security fixes until 4.0 reaches general availability, after which support timing depends on the policy. | Confirm the current end-of-life dates for your version with the OpenSearch releases page before setting your schedule. |
What to prepare before changing general.version
Changing general.version starts a rolling restart of every node, so the work that matters happens before the spec edit. The five cards below cover the backup, the configuration inventory, the rehearsal, the baseline and the Kubernetes version check, and each one ends with something you must confirm in your own environment.
Snapshot repository and verified backup
Confirm that a snapshot repository is registered, that a recent snapshot completed successfully and that you have restored a sample index from it somewhere else. This matters most for clusters with data nodes on emptyDir storage, because a node restart can lose local data and the operator requires general.drainDataNodes set to true for those nodes. Check that the repository credentials and storage location are reachable from the cluster and that the snapshot covers every index you need.
Inventory of plugins and custom configuration
List every plugin installed on the current version, along with its exact version, and every custom setting in the cluster spec, keystore entries and security configuration files. Confirm which plugins have releases for the target version and which settings were removed or renamed between the two versions. Record anything applied by hand to running pods, because a rolling restart can silently discard it.
Staging cluster built from the same spec
Build a non-production cluster from the same operator version and cluster spec, changing only the namespace, storage class and endpoints. Run the planned change to general.version there first and watch how long the rolling restart takes, whether the operator reaches green after each node, and whether your indices, search templates and security roles behave as expected. Treat the staging result as evidence only if its data volume and shard layout resemble production.
Baseline of cluster health and shard allocation
Record cluster health status, unassigned shard counts, node count by role and disk watermark headroom before the change. Note the current allocation settings and any indices with zero replicas, because these are the indices that will be unavailable while their only copy restarts. Confirm that the cluster is green before you start, since the operator waits for green after each node and a cluster that is already yellow will stall the rollout.
Kubernetes version and operator compatibility
Confirm that the OpenSearch operator release you run supports both the target OpenSearch version and your current Kubernetes version, and check the kube-apiserver version against the version skew policy. The policy requires kube-apiserver to be upgraded one minor version at a time and allows kubelets to lag by up to three minor versions. Confirm these details with your operator release notes and your distribution vendor, because an unplanned Kubernetes change during the same window makes failures harder to attribute.
Version skew policyHow the operator moves through a rolling upgrade
The path starts when an engineer confirms the running version is exactly one major below the target and takes a snapshot. Next, the engineer changes general.version in the cluster spec, and the operator restarts one node at a time, waiting for green status after each restart before it continues. A multi-major target is rejected before any node restarts. If status does not return to green, the operator stops and the team must investigate before the next node restarts. Finish by checking cluster health and state across all nodes.
Decision path for a rolling upgrade driven by the operator's cluster spec.
How to run the rolling upgrade step by step
This sequence moves a running OpenSearch cluster to a new version one node at a time through the Kubernetes operator, with a verified restore path if the upgrade goes wrong. Each step ends with a check that the cluster is healthy before the next one starts.
Confirm the upgrade path and target version
Confirm that the current cluster version and the target version are one major version apart, since the operator does not support upgrades across more than one major version. Check the operator release notes and the OpenSearch breaking changes for the target version, and confirm that every plugin and client library you rely on has a matching release. Your platform or database owner should sign off on the target in writing. The step is done when the current version, target version and plugin matrix are recorded in the change ticket.
Verify backups and run a restore test
Take a fresh snapshot of all indices, including security configuration, and confirm that it completed without partial failures. Restore a representative subset of indices into a separate test cluster or namespace, then compare document counts and a sample of queries against production. Because the operator does not support downgrades, this restore path is the only fallback if the upgrade fails. The step is done when the restore test passes and the snapshot ID is written down.
Set drain for emptyDir data nodes
Check whether any data nodes use emptyDir storage. If they do, set general.drainDataNodes to true in the cluster spec before changing the version, so the operator drains shards from those nodes before restarting them. Data on emptyDir is lost when a pod is removed, so this setting protects against shard loss on restart. The step is done when the spec shows the setting and the cluster reports no unassigned shards before the change begins.
Change the version in the cluster spec
Edit general.version in the cluster custom resource to the target version and apply the manifest through your normal change process, ideally from version control. The operator starts a rolling upgrade, restarting nodes one by one. Confirm in the operator logs and the custom resource status that the reconciliation has started. The step is done when the operator reports an in-progress upgrade for the expected version.
Watch each node restart and wait for green
Watch the pods restart in sequence and check cluster health through the cluster health API after each node returns. The operator waits for green status before moving to the next node, so a yellow or red status means the upgrade is paused on a problem. Investigate shard allocation, disk watermarks and node logs before intervening. Record the time and status at each node. The step is done when every node runs the target version and the cluster reports green.
Validate queries, Dashboards and security settings
Run your saved search, aggregation and ingest test suite against the upgraded cluster and compare results with the baseline from the restore test. Sign in to OpenSearch Dashboards with each identity provider you use, confirm that roles, tenants and field-level security behave as documented, and check that audit logging still writes events. Confirm that alerting and any scheduled jobs are running. The step is done when the test results match the baseline and the owners of each application have signed off.
Record the post-upgrade rollback point
Once validation passes, take a new snapshot of the upgraded cluster and label it with the new version. This becomes the rollback point for the next change, because the earlier version cannot be restored onto nodes that already run the newer release. Update the runbook, inventory and version records, and close the change ticket with links to the snapshot, operator logs and validation results. The step is done when the snapshot completes and the records show the new version as the current baseline.
Testing the upgrade and planning for failure
Rehearse the upgrade on a staging cluster built from the same cluster spec as production, changing only general.version and the environment-specific values. Run the same operator version and the same node pools, storage classes and plugin list, because a staging cluster that differs in the storage layer or in plugins will not show you the failure you are trying to find. Before the rehearsal, confirm the operator release notes and the OpenSearch operator cluster operations documentation for the exact target version, and confirm that the target is exactly one major version above the current one. The operator does not support multi-major jumps, so a plan that skips a major version has to be rebuilt before anyone touches staging.
Define pass and fail checks before the rehearsal starts. At minimum, check that cluster health returns to green after each node restart and that the operator waits for it before moving on. Compare index counts and document counts per index against the pre-upgrade baseline, then run search and ingest smoke tests that use the same query and bulk paths your applications use. Confirm that TLS, the Security plugin roles and the audit log still behave as expected, because a cluster can be green and still reject clients or stop recording audit events. Record the results so that the production change has a written comparison, not a memory of how staging looked.
Plan for failure on the assumption that you cannot roll back in place. The operator does not support downgrades, and an OpenSearch node cannot be moved back to an earlier version, so a failed upgrade means building a new cluster on the prior version and restoring data into it. That recovery route depends on a snapshot repository that the cluster can reach, a snapshot taken immediately before the change, and a restore procedure written in advance. Rehearse the restore into a separate cluster, time it, and confirm that applications can be pointed at it. Treat emptyDir data nodes as a special case: without a snapshot taken before the upgrade, their data does not survive pod replacement, so the snapshot is the only recovery path.
What makes an operator upgrade take longer
An operator-driven upgrade is a sequence of node restarts, and each restart waits for the cluster to recover. The cards below cover the factors that stretch that sequence: how much data and how many nodes must recover, storage and drain settings, configuration that must match the target version, Kubernetes prerequisites, and how many major versions separate the current and target releases.
Node count and shard volume
The operator restarts nodes one at a time and waits for green status after each restart. Every restart triggers shard recovery, so a cluster with many nodes and a large number of shards produces many recovery cycles. Before planning a window, count data nodes, count primary and replica shards per node, and measure how long a single node takes to return to green in a non-production copy of the cluster.
- Wait state per node
- Green
emptyDir data nodes and drain
Data nodes on emptyDir storage lose their data when a pod is removed, so the operator requires general.drainDataNodes set to true before they can be upgraded. Draining moves shards off the node first, which adds network and disk work to every step. Confirm which node groups use ephemeral storage, check that replicas exist for every index, and confirm that the drain setting is in place before changing the version.
Plugins and security configuration
Plugins and security configuration must match the target version before the rollout starts. A plugin built for the old release can stop a node from joining, and security settings that were valid in the old release may need changes in the new one. Compare the plugin list and security configuration in your cluster spec against the target release notes, and test the combination in a staging cluster that uses the same TLS and identity settings as production.
Custom images and Helm values
Custom container images and Helm values often pin versions or add files that the operator does not manage. An image built on an older base or a values file that hard-codes a version tag can override the new release or fail at startup. Inventory every custom image, init container, and values override, rebuild images for the target version, and check that each override still applies after the version change.
Kubernetes version skew and operator version
The Kubernetes version skew policy requires kube-apiserver to be upgraded first, one minor version at a time, before controller manager, scheduler and kubelets. Kubelets may be up to three minor versions older than kube-apiserver. The operator version must also support both the current cluster and the target OpenSearch version. Upgrade the platform and the operator in a planned order before changing the OpenSearch version, and confirm compatibility in the release notes.
Kubernetes version skew policyHops across major versions
The operator does not support upgrades across more than one major version, so a cluster that is two majors behind needs an intermediate upgrade. Each hop is a full rolling cycle with its own health waits, testing and rollback point. Identify the current major version, map the hops to supported targets, and estimate the total window as the sum of all hops rather than a single upgrade.
- Major version per hop
- One
Questions buyers ask before upgrading OpenSearch on Kubernetes
Can the OpenSearch Kubernetes operator skip a major version during an upgrade?
No. The operator does not support upgrades across more than one major version, so a cluster on an older major must move through each intermediate major in turn. Plan the path before touching the cluster spec, because each step needs its own validation window. If your cluster is several majors behind, the operator path may not be the right tool, and the OpenSearch migrate or upgrade docs describe Migration Assistant, which can move workloads across several major versions in one step. Confirm the current version of your cluster and the target before you choose a route.
Does the operator wait for green health before it restarts the next node?
Yes. When general.version changes in the cluster spec, the operator restarts nodes one by one and waits for green status after each restart. That gate protects replicas, but it also means an upgrade can stall if a shard never returns to green, for example because of disk pressure, unassigned shards or a node that fails to rejoin. Your team should know how to read cluster health and shard allocation before the first run. Check the OpenSearch operator cluster operations docs for the exact behavior of the version you run.
What happens to data on emptyDir data nodes during an operator upgrade?
Data on emptyDir storage is tied to the pod's lifetime, so a restart can remove it. The operator documentation says data nodes on emptyDir storage need general.drainDataNodes set to true for the upgrade to be safe. Treat emptyDir as cache-like storage unless you have a tested recovery path. For production data, most teams use persistent volumes and keep snapshots in a repository outside the cluster. Confirm your storage class, your snapshot schedule and whether a restore has been tested before the upgrade window opens.
Can we roll back an OpenSearch version after the operator upgrade completes?
Not by changing the version back in the spec. The operator does not support downgrades, so a rollback means restoring the cluster from a snapshot taken before the upgrade, or rebuilding onto the previous version from a known-good backup. That makes a snapshot taken immediately before the change a hard requirement, and it should be verified by a test restore into a separate environment. Ask your team who approves a rollback, how long a restore takes for your data volume and which indices must be kept in sync during the window.
How much effort does a Kubernetes operator upgrade take, and what do we need from our team?
No effort figure is published for this work, so estimate it from your own inputs: the number of major hops, the number of nodes, data volume, the number of plugins and client applications, and how many environments must be validated first. Effort is driven mostly by pre-upgrade testing and rollback planning rather than by the restarts. From your team you will need Kubernetes operator administrators, someone who owns the OpenSearch cluster and its index mappings, a security owner for TLS and access settings, and a person who can approve the change window. Ask any partner for a written scope that lists these roles and the environments in scope.
Can our own platform team perform this upgrade without an outside partner?
Yes, if your team already runs OpenSearch and the Kubernetes operator in production and has tested a snapshot restore. The operator performs the rolling restarts, so the main skills are reading cluster health, managing shard allocation, handling storage and rehearsing the multi-step path between majors. Teams without recent OpenSearch operations experience usually benefit from a written plan and an independent review before the first production change. DeployOpen plans, implements, upgrades, documents and supports self-hosted open-source platforms in your own infrastructure, and quotes follow from a written scope.
What should we confirm about the Kubernetes version before upgrading OpenSearch?
Confirm that your Kubernetes control plane and nodes are on versions the operator and your OpenSearch release support, and that your upgrade order follows the Kubernetes version skew policy. The policy requires kube-apiserver to be upgraded one minor version at a time and before kube-controller-manager, kube-scheduler and kubelets, and it allows kubelets to be up to three minor versions older than kube-apiserver. Check the Kubernetes version skew policy and the release status on the Kubernetes releases page before scheduling both upgrades in the same window.
How DeployOpen plans and runs your OpenSearch upgrade
DeployOpen scopes, builds, tests and hands over Kubernetes operator upgrades of self-hosted OpenSearch clusters inside infrastructure you control. Each engagement starts from your cluster spec, data node storage and version path, so the upgrade plan is agreed in writing before any node restarts.
How we scope
- We review the current cluster spec, operator version, and the OpenSearch version you run today
- We confirm the target version is exactly one major version ahead, since the operator does not support larger jumps
- We identify emptyDir data nodes and agree how general.drainDataNodes is set and what data loss risk remains
How we build
- We run the change first in a non-production cluster that mirrors your node roles and storage classes
- We script the general.version change, watch each node restart, and confirm green status before the next node moves
- We test client connections, authentication and index health after each step, and record the results
How we hand over
- You receive the agreed upgrade runbook, rollback limits and a checklist for health checks between nodes
- You receive the cluster spec changes, configuration files and a record of what was tested and in which order
- We walk your platform and operations engineers through the procedure and the points where a restore would be needed
How we support
- Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts
- Ongoing upgrades, patch maintenance and continuous testing are available as a retainer
- Quotes follow from the written scope, so ask for the scope items that drive effort, such as cluster count and storage

