Using Opster’s Management Console, you can easily change your Elasticsearch and OpenSearch credentials. Check out this video for instructions:
When deploying an OpenSearch cluster with OMC, it is important to secure it by using custom admin credentials. This guide will show users how to create an admin credentials secret in Kubernetes and attach it to clusters on the OMC. This secret will contain a custom username and password that users can use to log in to their OpenSearch cluster as administrators.
Step 1: Create the Secret File
The first step is to create a k8s resource containing an admin username and password.
Do this with one of these two options:
Option 1: YAML file that defines the secret. Create a file named opensearch-admin-credentials.yaml with the following content:
apiVersion: v1 kind: Secret metadata: name: opensearch-admin-credentials namespace: <the namespace where the cluster will create> type: Opaque stringData: username: <your admin username> password: <your admin password>
Make sure to replace <your admin username> and <your admin password> with the desired values.
Next,apply the YAML file to the Kubernetes cluster using the following command:
kubectl apply -f opensearch-admin-credentials.yaml
This will create a new secret named opensearch-admin-credentials in their Kubernetes cluster.
Option 2: Using kubectl command:
kubectl create secret generic opensearch-admin-credentials --from-literal=username=<your admin username> --from-literal=password=<your admin password> -n <the namespace where the cluster will create>
Step 2: Attach on the OMC
After creating the secret, users must choose the namespace that the secret was created in, and in the ‘Security’ section, change the ‘Admin Credentials Secret’ to ‘Use existing secret,’ choosing the secret that was just created.