Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to change namespace from other than wazuh #627

Open
ghalib9001 opened this issue Mar 22, 2024 · 3 comments
Open

how to change namespace from other than wazuh #627

ghalib9001 opened this issue Mar 22, 2024 · 3 comments

Comments

@ghalib9001
Copy link

ghalib9001 commented Mar 22, 2024

Hello,
We are trying to deploy this in kubernetes in a devn and production environment and we need to isolate it based on the namespace. Is there a way for us to use custom namespace with this? something like wazuh-dev, wazuh-prod?
We tried changing the namespace but when we did, the agents would not connect for some reason. they would show up in the dashboard but would never go past the "never connected" stage
Thanks.

@Thorgrym
Copy link

Thorgrym commented Apr 2, 2024

Is the agent connecting properly when you don't change the namespace ?
If not the problem could be this : #547

@ghalib9001
Copy link
Author

yes the agents are connecting fine when we set the namespace to wazuh. btw we're using wazuh 4.7.2 for the server and the agents

@crlsgms
Copy link

crlsgms commented Apr 29, 2024

I managed to change the namespace creating it first on kubernetes (Im using rancher + longhorn + rke)

the main reference is the wazuh/base/wazuh-ns.yaml file:
apiVersion: v1 kind: Namespace metadata: name: change-to-the-already-created-namespace

and a rough sed, probably not the best way, but works for now:
go to the root wazuh-kubernetes folder and run

grep -r "namespace: wazuh" | cut -d: -f1 | xargs sed -i 's/namespace: wazuh/namespace: change-to-the-already-created-namespace/g'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants