Wazuh Kubernetes requirements and architecture
This section outlines Wazuh components within a Kubernetes cluster, including the manager, indexer, and dashboard. It describes the resource requirements, storage setup, and controller types used for each component.
Prerequisites
Before you begin to deploy Wazuh, ensure that the following prerequisites are met:
Kubernetes cluster
A running Kubernetes cluster with
kubectlconfigured for communication, Kustomize support for applying manifests (included inkubectlversion 1.23 and later), and thegit,curl, andopensslutilities installed.A container network interface (CNI) plugin that enforces Kubernetes network policies. On Amazon EKS, enable network policy support in the Amazon VPC CNI add-on before deploying.
Note
When using Minikube, start the Kubernetes cluster with Calico CNI enabled by running the command below.
$ minikube start --cpus=4 --memory=6144 --cni=calico
Storage class
Amazon EKS
Amazon EBS CSI driver with appropriate IAM role configuration for Amazon EKS deployments using Kubernetes version 1.23 and later. The CSI driver requires that you assign an IAM role to work properly. For detailed instructions, refer to AWS documentation on Creating the Amazon EBS CSI driver IAM role.
Local cluster
Local storage provisioners such as microk8s.io/hostpath and k8s.io/minikube-hostpath.
Note
Other managed Kubernetes services, such as Google GKE and Azure AKS, need a storage class that supports dynamic volume provisioning and provides low-latency storage, especially for the Wazuh indexer. For example, use GCE Persistent Disk on GKE and Azure Disk on AKS, through their CSI drivers.
Resource requirements
The minimum cluster resources required for deploying the Wazuh central components are listed below:
Amazon EKS
5 CPU units
8 Gi of memory
Local cluster
4 CPU units
6 Gi of memory
2.5 Gi of storage for volumes, plus about 12 GB of disk for the container images
Overview
StatefulSet and Deployment controllers
A StatefulSet manages pods based on identical container specifications. Unlike Deployments, StatefulSets maintain a persistent identity for each pod. Pods are created from the same specification, but are not interchangeable. Each pod retains a persistent identifier that survives rescheduling.
StatefulSets are useful for stateful applications, such as databases that persist data. The Wazuh manager and Wazuh indexer components maintain their states, so we use StatefulSets to ensure state persistence across pod restarts.
Deployments are intended for stateless applications and are lightweight. Traefik doesn't need to maintain state, so it runs as a Deployment. The Wazuh dashboard also runs as a Deployment, with one replica. It keeps its configuration directory and keystore on the wazuh-dashboard-config persistent volume claim.
Persistent volumes (PV) are storage resources in the cluster. They have a lifecycle independent of any individual pod that uses them. This API object captures storage implementation details for NFS, iSCSI, or cloud-provider-specific storage systems.
We use persistent volumes to store data from the Wazuh manager, the Wazuh indexer, and the Wazuh dashboard.
For more information, see the Kubernetes persistent volumes documentation.
Pods
A pod is the smallest and most fundamental deployable unit in Kubernetes. It represents a single instance of a running process in your cluster. In our deployment, each Wazuh component runs inside a container image, and these containers are deployed within pods. You can view how we build Wazuh Docker containers in our repository.
Wazuh master
The master pod contains the master node of the Wazuh manager cluster. The master node centralizes and coordinates worker nodes. It ensures critical data remains consistent across the Wazuh manager cluster. Management operations occur only on this node, so the Wazuh API runs here. The master node also serves the enrollment service (authd) that Wazuh 4.x agents use on port 1515. Wazuh 5.x agents enroll on port 1517 through any Wazuh manager node.
Image |
Controller |
|---|---|
wazuh/wazuh-manager |
StatefulSet |
Wazuh worker
The Wazuh worker pods contain the worker nodes of the Wazuh manager cluster. They receive Wazuh agent events.
Image |
Controller |
|---|---|
wazuh/wazuh-manager |
StatefulSet |
Wazuh indexer
The Wazuh indexer pod is used to create the Wazuh indexer cluster.
Image |
Controller |
|---|---|
wazuh/wazuh-indexer |
StatefulSet |
Wazuh dashboard
The Wazuh dashboard pod provides visualization of Wazuh indexer data, Wazuh agent information, and Wazuh manager configuration.
Image |
Controller |
|---|---|
wazuh/wazuh-dashboard |
Deployment |
Services
Wazuh indexer and dashboard
Name |
Description |
|---|---|
wazuh-indexer |
|
dashboard |
|
Wazuh manager
Name |
Description |
|---|---|
wazuh-api |
Internal service for the Wazuh manager API on port |
wazuh-registration |
Wazuh 4.x agent enrollment service ( |
wazuh-agents |
Wazuh agent connection and enrollment on port |
wazuh-events |
Wazuh 4.x agent event traffic (legacy |
wazuh-cluster |
Headless service for internal communication between Wazuh manager nodes on port |
Network policies
Wazuh uses Kubernetes network policies to control communication between components and to restrict unauthorized traffic. Each policy defines specific allowed connections, while all other traffic is blocked by default.
The following network policies are included:
allow-dns: Allows all pods in thewazuhnamespace to send DNS queries (UDP and TCP port53) to the cluster DNS service (kube-dnsinkube-system) so that they can resolve service names.allow-ingress-to-dashboard(EKS only): Permits incoming traffic from the ingress controller to port443of the Wazuh dashboard.allow-ingress-to-manager-master(EKS only): Allows incoming traffic from the ingress controller to ports1517and1515of Wazuh manager (master).allow-ingress-to-manager-worker(EKS only): Allows incoming traffic from the ingress controller to ports1517and1514of Wazuh manager (worker) .dashboard-egress: Allows outgoing traffic from Wazuh dashboard pods to port9200of the Wazuh indexer and port55000of the Wazuh manager master.default-deny-all: Blocks all incoming and outgoing traffic that is not explicitly allowed by another network policy. This ensures a secure-by-default configuration.indexer-egress: Allows outgoing traffic from Wazuh indexer pods to ports9200and9300of other indexer nodes for cluster communication.indexer-ingress: Allows incoming traffic to Wazuh indexer pods from the dashboard (port9200), manager (port9200), and other indexer nodes (port9300).manager-egress-external: Allows outgoing HTTPS traffic (TCP port443) from Wazuh manager pods to any address. This is required for downloading CTI updates and other external resources.manager-egress: Allows outgoing traffic from Wazuh manager pods to the Wazuh indexer on port9200.wazuh-api-ingress: Allows incoming traffic to the Wazuh manager master from the Wazuh dashboard on port55000(Wazuh API) and from other Wazuh manager pods on port1516(Wazuh cluster communication).wazuh-worker-egress: Allows outgoing traffic from Wazuh manager worker pods to manager ports1516and55000for cluster coordination.