In order to change the admin password you must follow the next steps:
1) Obtain hash password into indexer pod
* outside pod:
kubectl exec -it -n wazuh pod/wazuh-indexer-0 -- bash* inside pod:
export JAVA_HOME=/usr/share/wazuh-indexer/jdk
bash /usr/share/wazuh-indexer/plugins/opensearch-security/tools/hash.sh
2) Insert new password and create a new hash. Replace admin value with new hash into wazuh/indexer_stack/wazuh-indexer/indexer_conf/internal_users.yml file
3) Change value of password parameter into wazuh/secrets/indexer-cred-secret.yaml file
4) Apply changes into your k8s cluster:
kubectl apply -k envs/eks/
5) Add environment variables and run securityadmin script:
export INSTALLATION_DIR=/usr/share/wazuh-indexer
export OPENSEARCH_PATH_CONF=${INSTALLATION_DIR}/config
CACERT=$OPENSEARCH_PATH_CONF/certs/root-ca.pem
KEY=$OPENSEARCH_PATH_CONF/certs/admin-key.pem
CERT=$OPENSEARCH_PATH_CONF/certs/admin.pem
export JAVA_HOME=/usr/share/wazuh-indexer/jdk
bash /usr/share/wazuh-indexer/plugins/opensearch-security/tools/securityadmin.sh -cd /usr/share/wazuh-indexer/plugins/opensearch-security/securityconfig/ -nhnv -
cacert $CACERT -cert $CERT -key $KEY -p 9300 -icl
6) Clear cache and test your new password