This repository contains Kubernetes manifests for deploying a complete monitoring and security stack consisting of:
- Wazuh Manager (security monitoring)
- Wazuh Indexer
- Elasticsearch (2-node cluster)
- Kibana (visualization dashboard)
-
Before deploying, ensure you have:
-
Kubernetes cluster running on VMware vSphere
-
kubectl installed and configured to access your cluster
-
Sufficient resources in your vSphere environment:
- At least 6 vCPUs and 8GB RAM available
- At least 100GB of storage capacity
-
Ingress controller installed in your cluster (e.g., NGINX Ingress)
-
Domain names configured for accessing Kibana and Wazuh API
git clone https://github.com/yourusername/wazuh-elk-k8s.git
cd wazuh-elk-k8s
Before deploying, update the following:
- In
elasticsearch-secret.yaml
andwazuh-secret.yaml
: - Change the default passwords (base64 encode your passwords)
echo -n "your-secure-password" | base64
- In
ingress.yaml
: - Update the hostnames to match your domain names
kubectl apply -f namespace.yaml
kubectl apply -f vsphere-storage-class.yaml
kubectl apply -f elasticsearch-secret.yaml
kubectl apply -f wazuh-secret.yaml
kubectl apply -f elasticsearch-statefulset.yaml
Wait for the Elasticsearch pods to be in Running state:
kubectl get pods -n monitoring -l app=elasticsearch -w
First, create the persistent volume claims:
kubectl apply -f wazuh-manager-pvcs.yaml
Then deploy the Wazuh indexer:
kubectl apply -f wazuh-indexer-statefulset.yaml
Wait for the Wazuh indexer pod to be in Running state:
kubectl get pods -n monitoring -l app=wazuh-indexer -w
Finally, deploy the Wazuh manager:
kubectl apply -f wazuh-manager-deployment.yaml
kubectl apply -f kibana-deployment.yaml
Wait for the Kibana pod to be in Running state:
kubectl get pods -n monitoring -l app=kibana -w
kubectl apply -f ingress.yaml
kubectl get pods -n monitoring
All pods should be in the Running
state.
- Navigate to
https://kibana.yourdomain.com
in your browser - Log in with:
- Username:
elastic
- Password: (the password you set in
elasticsearch-secret.yaml
)
- In Kibana, navigate to the Wazuh app (you may need to install it from the Kibana plugin menu)
- Configure the connection to the Wazuh manager:
- URL:
https://wazuh.yourdomain.com
- Port:
55000
- Username:
wazuh
- Password: (the password you set in
wazuh-secret.yaml
)
- In the Wazuh app in Kibana, go to "Agents" and click "Deploy new agent"
- Follow the instructions to deploy agents on your systems