How to move Wazuh from virtual machines to Kubernetes without losing agents or alert history
If your team runs the package-based Wazuh indexer, server and dashboard on virtual machines and wants the Kubernetes deployment, plan this as a rebuild on a new platform, not a file copy. The work is to stand up the containerized components with StatefulSets and persistent volumes, carry over the agent keys, server configuration and custom rules, and move historical indices so that alerts stay searchable. Run the old and new stacks in parallel until agents have reconnected and the new indices are verified. The exact steps, and the Wazuh documentation behind each one, must be confirmed against the version you run. The current line is 4.14, and the latest patch in the supplied release history is 4.14.9, released on 14 October 2026. Confirm your installed patch level first, because the Kubernetes deployment files and upgrade notes change between patch releases.
Start with an inventory that separates state from software. Agent keys held by the Wazuh server, the ossec.conf configuration, custom decoders, rules and CDB lists, dashboard saved objects, certificates and the indexer data each need a different path into the new cluster. Decide early how the Kubernetes deployment will reach agents, since agent ports must be exposed through a service or ingress that agents can resolve and reach from every network segment they use today. Confirm with your Kubernetes platform team whether they can provide persistent storage with the performance and snapshot behavior the indexer needs, and whether your cluster can hold the certificates and secrets Wazuh expects, handled as Kubernetes Secrets with encryption at rest and tight RBAC.
Sequence the cutover so that agents never lose their enrollment. Keep the existing server on the old hosts as the source of truth until the new server holds identical keys and configuration, and confirm that a test agent reconnects to the new endpoint before you redirect the fleet. Snapshot the indexer and restore the indices into the new cluster, then compare document counts and the latest alert timestamps for each index. Record the rollback path for each step, because a failed indexer restore is much easier to reverse before agents point at the new stack. Ask your implementation partner or vendor for a written runbook that names each Wazuh documentation page used, and confirm every command against the 4.14 patch you run.
What maps cleanly from VM-based Wazuh and what does not
This table maps each part of a package-based Wazuh installation to its counterpart in a Kubernetes deployment and marks whether it carries over as data, must be regenerated, or changes because the agent endpoint is exposed differently. Read the middle column as the migration action and the last column as the item to verify before cutover. The main takeaway is that the indexer and server state moves as data, while agents are not moved at all and instead reconnect to the new endpoint.
| Item | VM-era form | Kubernetes handling |
|---|---|---|
| Wazuh indexer | Package-installed node with its own data directory | Carries over as data: copy index data into a StatefulSet volume, then confirm cluster health and shard allocation |
| Wazuh server | Manager on the host, with ossec.conf and daemon state | Config carries over, daemon state is regenerated by the new pods on first start |
| Wazuh dashboard | Web service on its own host or shared with the server | Stateless pod, but saved objects are stored in the indexer and must be verified after import |
| Wazuh agents | Installed on endpoints and enrolled to the manager | Not moved. Agents reconnect to the new agent endpoint, so DNS and port exposure must be planned |
| Manager keys and agent registration | Client keys file on the server host | Must be restored from backup so existing agents can authenticate, or agents must re-enroll |
| ossec.conf, custom rules and decoders | Files under the server configuration directory | Carry over as ConfigMaps or volumes, then retested with the rule test tool before cutover |
| Certificates | Files generated for the indexer, server and dashboard | Regenerated or re-issued for service names inside the cluster, and the agent-facing certificate chain checked |
| Agent group configuration | Stored under the server shared configuration directory | Carries over as files, so confirm group membership before agents reconnect |
What the Kubernetes cluster must provide before Wazuh pods run
The Wazuh workloads are only as durable as the cluster under them, so the platform decisions come before any Wazuh manifest is applied. Start with the control plane. The kubeadm high availability guide describes two topologies: a stacked control plane with etcd on the same nodes, and an external etcd cluster. Either way, plan at least three control plane nodes, a TCP load balancer in front of kube-apiserver on port 6443, and an odd number of etcd members. Kubernetes documentation recommends five members for production. Decide which topology you will run, because changing it later is a rebuild, not a setting.
Next, plan etcd recovery and Secrets protection. Wazuh's indexer, server and dashboard credentials, agent registration material and certificates will be stored as Kubernetes Secrets, and Secrets are stored unencrypted in etcd by default. Configure encryption at rest for Secrets, restrict list and watch on Secrets with least-privilege RBAC, and decide whether an external store through the Secrets Store CSI Driver fits your key management model. Schedule etcd snapshots with etcdctl snapshot save and rehearse a restore with etcdutl before you rely on it. Enforce Pod Security Standards on the Wazuh namespace so that the workloads that hold agent keys cannot run privileged.
Finally, fix the version. The Kubernetes project maintains the three most recent minor releases, and as of September 2026 these were 1.37 (end of life October 28, 2027), 1.36 (June 28, 2027) and 1.35 (February 28, 2027). Choose a minor version that still has support for the period you plan to run, and remember that kube-apiserver must be upgraded one minor version at a time, ahead of the other control plane components and kubelets. Confirm with the Wazuh documentation that the Kubernetes manifests you plan to use are tested against your chosen Kubernetes version before you schedule the migration.
Documented paths for exporting, restoring and checking data
Moving a package-based Wazuh into Kubernetes depends on five documented paths: the install method, configuration and keys, historical indices, the API and the dashboard. Confirm each one against the current Wazuh documentation for your installed version before scheduling any work, and avoid steps that are not listed there.
Kubernetes install method
The Wazuh deployment options page lists Kubernetes as a supported install method, which is the starting point for the target layout. Check which manifests, chart or image set the documentation names for your release, how it expects storage to be provisioned, and which components it deploys as StatefulSets. Compare that layout with the single-host components you run today before you draft the cutover plan.
- Current release line
- 4.14
Configuration and agent keys
The vendor backup and restore guidance covers the configuration files and the agent key material that let enrolled agents reconnect to the server. Confirm exactly which paths the documentation lists for your version, how the keys are protected in transit and at rest, and whether the restored server must keep the same identity. Store copies of these files in a controlled location, since a missing key forces re-enrollment of every endpoint.
Indexer snapshots for historical indices
Indexer snapshot and repository features are the documented route for moving historical alert indices. Confirm which repository type the documentation supports for your deployment, how the snapshot repository is registered on the source and target clusters, and how index names and mappings are kept consistent after restore. Test a restore of a single index before relying on the full set, and record the alert date range each snapshot covers.
Wazuh API agent and group checks
The Wazuh API lets you confirm the migration from the outside: agent count, connection status, group membership and the active configuration. Run the same queries against the old and new servers and compare the results before and after the cutover. Confirm the endpoints and authentication method in the documentation for your version, and keep the output as a dated record for the change file.
Dashboard view verification
The Wazuh dashboard shows whether restored saved views, agent lists and historical alerts are visible to the users who need them. Check that role-based access still returns the expected data, that time ranges pull the restored indices, and that compliance views render the same controls as before. Confirm with the documentation which saved objects are included in the backup, since views not covered there will need to be recreated by hand.
Sequence for moving Wazuh to Kubernetes with a parallel run
This sequence moves a package-based Wazuh deployment onto Kubernetes in stages, so agents, keys, indices and integrations are verified at each gate before any endpoint is pointed at the new stack and the old VMs are retired.
Inventory agents, indices, certificates and integrations
Your team and the DeployOpen engineers list every enrolled agent with its group and operating system, the indices and retention settings on the indexer, the certificates and keys in use, and every integration that reads from or writes to Wazuh, including syslog sources, API consumers, custom decoders, rules and CDB lists. Record the Wazuh release currently running on each component, since the target image must match it. The step is done when the inventory is reviewed and signed off by the platform owner and the security team, and every item has a named owner and a restore or rebuild decision.
Build and harden the Kubernetes cluster
Build the cluster in infrastructure you control, with persistent volumes for the indexer and server data, the control plane and etcd layout your team chose, identity integration for administrators, encryption at rest for Secrets, least-privilege RBAC and Pod Security Standards applied to the Wazuh namespace. Confirm the Kubernetes version against the support dates on the Kubernetes releases page before you commit to it. The step closes when a test workload survives a node restart, storage classes behave as expected, and the security baseline is documented against the CIS Kubernetes Benchmark.
Pilot with a small agent group
Deploy the Wazuh components to the cluster with StatefulSets and persistent volumes, then point one small agent group at the new manager through a test address. Keep the VM stack running and receiving all other agents. Watch enrollment, keepalive traffic, alert arrival in the new dashboard and the rule and decoder behavior against known events. This step is the first place a network or port problem appears, so plan it inside a change window that includes a rollback to the original address. It is done when pilot agents report continuously for the agreed observation period and no alert is missing from the expected sources.
Restore keys, configuration and indices
Restore the manager and agent keys, the configuration, custom rules, decoders and CDB lists into the new server, and load historical indices into the new indexer from snapshots or the documented backup procedure. Compare document counts and sample alerts per index between source and target, and confirm that the dashboard views, saved searches and API credentials work. Confirm restored data is read-only where it should be, and that any index that will not be migrated is archived first. The step closes when counts and sample checks match the inventory and the restore is recorded in the change log.
Run both stacks in parallel
Configure the integrations that feed the SIEM so that both the VM stack and the Kubernetes stack receive alerts for a defined period, and expand the agent groups that report to the new cluster in stages. Compare alert volumes, rule firing and dashboard results between the two stacks, and investigate every difference before moving the next group. Confirm vulnerability detection feeds and offline repositories, if used, are current on the new stack. The parallel run closes when both stacks agree on the agreed sample set and the SOC has accepted the new dashboards for day-to-day use.
Cut over agent endpoints and DNS
Move the remaining agents to the new manager address by updating the DNS record or load balancer target during a planned change window, then stop forwarding from the old stack once every group reports to Kubernetes. Expose agent ports through the approved service type or ingress, and confirm that firewall rules allow the agent traffic on the ports your deployment uses. Keep the old VMs powered on and reachable for rollback until the gate passes. The cutover is complete when all agents show as active on the new stack, the old manager shows no new agent connections, and integrations report healthy.
Decommission the VMs after archiving
After a defined stability period agreed in advance, take a final snapshot of the VM indexer, server and configuration, store it in your retained archive with its checksums and a restore note, and record who approved the archive. Then remove the VMs from monitoring, revoke retired keys and credentials, and delete the old DNS entries and firewall rules that pointed at them. The step is done when the archive restore has been tested at least once, access to the archive is limited to the named owners, and the decommission ticket is closed with evidence attached.
How traffic and data move during the parallel run
The diagram starts with agents still reporting to the VM-based Wazuh stack, which keeps serving alerts while the Kubernetes stack is built and loaded. The Wazuh indexer data is restored into the cluster and the historical alerts are checked there before anything moves. Agents are switched to the cluster ingress only after enrollment keys and configuration have been verified, and the VM stack is decommissioned last, once the cluster has held its alerts and agent connections for an agreed period. The trust boundary around the cluster ingress is where you should confirm which ports are exposed and who can reach them.
Agent and indexer data flow between the VM stack and the Kubernetes cluster during cutover.
What drives the effort and duration of this move
This table lists the factors that most change the cost and schedule of moving a package-based Wazuh install onto Kubernetes. For each driver it shows who does the work, whether the cost is one-time or recurring, and what to request in a quote. Use it to scope the work before asking for a fixed-price proposal.
| Driver | Why it changes effort | Who pays and what recurs | What to request in a quote |
|---|---|---|---|
| Number of agents and agent groups | Each group needs its config mapped to the new server and agents must be re-pointed or confirmed reconnecting after cutover. | Client pays for a one-time agent test pass; agent group upkeep recurs with fleet growth. | Agent count by OS, group list, and the plan for staged reconnection. |
| Size and age of indexed alert history | Large indices take longer to snapshot, restore and verify inside the new indexer volumes. | One-time migration work; storage for retained history recurs on the cluster. | Index size and count, retention period, and the restore and verification steps. |
| Custom decoders, rules and CDB lists | Files must be copied into ConfigMaps or persistent volumes and checked for syntax and load order in the containers. | One-time validation; ongoing rule tuning recurs. | Count of custom files, a load test plan, and who signs off on detection parity. |
| SAML or internal user configuration | Identity provider callbacks, certificates and role mappings often refer to the old hostname and must be rebuilt for the new ingress. | One-time reconfiguration; identity provider changes recur. | Confirmation of the provider, the new dashboard URL, and the fallback admin account plan. |
| Integrations that send alerts out | Each outbound connector needs its target address, credentials and network path checked from the cluster network. | One-time reconnection; connector maintenance recurs. | List of integrations, their endpoints, and a test alert per destination. |
| Certificate and key complexity | Server, indexer and dashboard certificates, plus agent keys, must carry over or be reissued without breaking enrollment. | One-time key and certificate handling; renewal schedule recurs. | Certificate authority in use, expiry dates, and whether keys are preserved or reissued. |
| Kubernetes cluster readiness | Storage classes, ingress or load balancer for agent ports, and StatefulSet volume support all affect the build. | Client usually pays for cluster build; a partner may add setup work. Node upkeep recurs. | Cluster version, storage class details, and how agent ports are exposed. |
| Number of Wazuh versions in use | Mixed agent versions across the fleet and a server version that must match the target image can add upgrade steps before the move. | One-time version alignment; patch cadence recurs. | Version of server, indexer, dashboard and each agent family, and the target release. |
What usually goes wrong and how to prevent it
Most failed moves from virtual machines to Kubernetes trace back to a short list of causes: identity and endpoint changes, data restored without its structure, and exposure that nobody planned. Each card below names one cause, the step that prevents it, and what to confirm in your own environment before cutover.
Agents fail to reconnect
Agents authenticate with keys issued by the original manager, and they connect to the endpoint recorded in their configuration. If the key set is not restored exactly, or the new manager service address differs from the one agents were configured with, agents appear offline after cutover. Export and restore the agent keys and the manager endpoint together, then check that a sample of agents from each group reports in before you retire the old host. Confirm how your agents resolve the manager name, because a DNS change may reach some networks later than others.
Wazuh deployment optionsAlert gap during cutover
If agents are repointed before the new indexer and server are ready, events generated during the window are either queued on endpoints or lost, depending on agent buffering and how long the outage lasts. Plan a defined freeze point, confirm the last alert timestamp in the old indexer, and verify that the new stack ingests events from every agent group before the old stack stops. Ask your team to document the expected gap so auditors and incident responders know which period has reduced coverage.
Indices restored without matching mappings
Historical alerts restored into a cluster whose index templates, field mappings or index naming differ from the source can break dashboards, saved searches and alert queries, even when the documents themselves load. Recreate the templates before restore, confirm the Wazuh version of the restored data matches the running stack, and query a known event from a known date in the dashboard. Confirm with your own team which indices must remain searchable and which can move to an archive.
Secrets readable in etcd
Kubernetes stores Secrets unencrypted in etcd by default, so Wazuh credentials, certificates and API passwords placed in Secrets are readable by anyone with access to etcd backups or the datastore. Enable encryption at rest before loading production Secrets, restrict list and watch permissions with least-privilege RBAC, and consider an external store through the Secrets Store CSI Driver. Confirm who can read etcd snapshots in your organization, since backups often sit in places with looser access than the cluster.
Kubernetes Secrets practicesPorts exposed wider than agents need
Exposing the agent enrollment and communication ports through a broad NodePort or an ingress rule open to the internet widens the attack surface of the manager and indexer. Expose only the agent-facing service, restrict source networks to the address ranges where agents actually sit, and keep the indexer and dashboard on internal services. Review the rules after deployment and confirm with your network team which agent segments and firewalls must be allowed.
Rollback never rehearsed
Teams often plan a cutover but never test the path back to the virtual machine stack, so when agents or dashboards misbehave, the decision to revert is made under pressure without tested steps. Rehearse the full sequence in a non-production copy: repointing agents, restoring keys on the old host and confirming alert flow. Record the time each step takes and who approves the decision, and confirm that the old virtual machines remain intact until the rehearsal has passed.
Questions buyers ask before moving Wazuh to Kubernetes
What drives the cost of moving Wazuh from virtual machines to Kubernetes?
The cost depends mainly on how many components move, how much historical data must come along, and how much of the target cluster already exists. Costs fall into two groups. The first is one-time work: assessing the current VMs, building or validating the cluster, writing StatefulSets and volumes, restoring keys and configuration, moving indices and running cutover. The second is recurring work after go-live: upgrades, backups and agent-facing changes. Ask any partner for a fixed-scope quote with the scope, deliverables and timeline written out. DeployOpen agrees scope, deliverables and timelines in writing before work starts, so you can compare the quote against a defined list of items. We do not publish a price list, and a quote follows from the written scope.
How long does a Wazuh move to Kubernetes take?
Duration depends on the size of the indexer data, the number of agents, whether the Kubernetes cluster is ready, and how many change windows your organization allows. A cluster that is not yet built, or one that lacks persistent storage and an etcd backup plan, adds time before any Wazuh work starts. Large historical indices take longer to copy and verify than small ones. Each agent-facing step also needs time for validation. No duration is given here because none is supplied for this migration. Ask for a timeline in the written scope, and check that it lists the cluster readiness work, the data-copy window and the cutover rehearsal separately.
Can our own team do this migration in-house?
Yes, if your team has people who can operate Kubernetes stateful workloads and who know the Wazuh installation well. The work combines two skill sets. Cluster owners need to handle StatefulSets, persistent volumes, network exposure of agent ports and backups of cluster state. Wazuh administrators need to know which keys, configuration files and indexed data must move and in what order. Teams that lack one of these skill sets often stall at cutover. A useful first step is a short readiness review that lists which skills are present and which must be added, whether by training, an internal hire or a partner.
What does our staff need to provide during the migration?
Plan for four groups of people and time from your organization:
- Cluster owners who can grant access, review manifests and confirm storage classes and network policies.
- Wazuh administrators who can confirm the current version, configuration and key locations on the VMs.
- Change windows approved in advance for the data copy and the agent-facing cutover.
- Agent owners who can confirm which endpoint groups will be pointed at the new manager address and who will check connectivity afterward.
Agree these named contacts and windows in the written scope so that work does not wait on availability during the cutover.
Do we have to reinstall every Wazuh agent after the move?
Usually not, but you must confirm it against your own environment before cutover. The goal of the move is for agents to reconnect to the new server without re-enrollment, which depends on keeping the agent keys and the manager address stable or updating them in a controlled way. If the address changes or the keys are not carried over, agents may need to be re-enrolled, and that work spreads across every endpoint group. Ask for a written list of the agent-facing changes, a test group that reconnects first, and a rollback step if agents fail to reconnect.
Can we keep our historical alerts after moving to Kubernetes?
Yes, historical alerts can usually be kept, but the method and the time needed depend on the size of the indices and the indexer version in use. The indexed data must be exported or snapshotted from the VM-based indexer and restored into the new indexer volumes, then checked for completeness. Confirm with the Wazuh documentation for your release how snapshots are created and restored in your layout. Ask for a verification step that compares document counts or sampled alerts before and after the move, and for a decision on how long the old VMs stay available for search.
What happens to keys, configuration and secrets during the move?
Agent keys, server configuration and credentials must move without being exposed in plain text. Kubernetes stores Secrets unencrypted in etcd by default, so the design should enable encryption at rest and restrict list and watch access with least-privilege RBAC, or use an external store through the Secrets Store CSI Driver. Ask the team to inventory every key and certificate, record who can read each Secret, and remove copies left on the old VMs once cutover is verified. Treat this inventory as part of the scope agreed in writing.
What are the main risks of moving Wazuh to Kubernetes?
The main risks are lost alert history, agents that fail to reconnect, and an unrecoverable cluster state. Other risks include storage that does not persist across pod restarts, exposed agent ports that are not protected, and an etcd backup plan that has never been tested. Mitigation is a rehearsed cutover, a verified backup of the VM deployment before any change, a rollback path and a written decision on who approves the switch. Ask for these controls to appear as named deliverables in the written scope.
How DeployOpen scopes, delivers and supports the migration
DeployOpen approaches a move from package-based Wazuh on virtual machines to the Kubernetes deployment as a written, fixed-scope engagement. The work starts with an inventory of your current keys, configuration, indices and agent paths, then builds and verifies the target in your own infrastructure before any cutover.
How we scope
- Inventory of current Wazuh components, versions, agent counts and the data each node holds
- Target cluster, storage classes, ingress and agent port exposure agreed before build starts
- Written scope listing migration steps, deliverables, cutover window and acceptance checks
- Fixed-scope engagement terms, with ongoing support available as a retainer after handover
How we build
- StatefulSets and persistent volumes configured for indexer, server and dashboard components
- Keys, agent enrollment material and configuration restored and checked against the source host
- Historical indices moved and validated, with agent reconnection tested on the new endpoints
- Hardening and Pod Security settings reviewed against your cluster policy during the build
How we hand over
- Runbook covering deployment manifests, volume layout, backup locations and restore steps
- Cutover record showing which agents reconnected, which indices moved and what was verified
- Rollback plan kept with the original virtual machines until your team accepts the new platform
- Walkthrough with your platform and security teams on daily operation and upgrade ownership
How we support
- Retainer options for upgrades, patch releases and recurring checks after the migration
- Periodic review of Kubernetes version support and the Wazuh release line you run
- Security testing of the deployed setup available as a separate scoped engagement
- Support scope confirmed in writing, including response expectations, before any retainer starts

