Create an OpenSearch service
Apply the following object on your namespace, as specified by its YAML description.
Example to create an OpenSearch instance
apiVersion: exoscale.appcat.vshn.io/v1
kind: ExoscaleOpenSearch
metadata:
name: my-opensearch-example (1)
namespace: my-namespace (2)
spec:
parameters:
backup:
timeOfDay: "12:00:00" (3)
service:
zone: ch-dk-2 (4)
majorVersion: "2" (5)
opensearchSettings:
http_max_content_length: 12345 (6)
size:
plan: hobbyist-2 (7)
writeConnectionSecretToRef:
name: opensearch-creds (8)
1 | Instance name |
2 | The namespace where the object will be created |
3 | Specify backup time of day |
4 | The Exoscale zone to use, see list of regions |
5 | OpenSearch major version |
6 | Specify custom OpenSearch settings [optional] full list of params |
7 | See reference for a list of plans |
8 | Secret where the connection details are provisioned. This secret shouldn’t exist before creation. |
To get more information about all available configuration options, please see the API Reference |
Inspect your new OpenSearch instance
$ kubectl get exoscaleopensearches.exoscale.appcat.vshn.io
NAME SYNCED READY CONNECTION-SECRET AGE
test1 True True opensearch-creds 8m21s
When you see True
in the READY column, it means the instance is provisioned and ready to use.
Find the connection details
The connection details are stored in a secret. You can retrieve them with the following command:
$ oc get secrets opensearch-creds -o yaml
The output of the command above is a secret specification with the following structure:
apiVersion: v1
kind: Secret
metadata:
name: opensearch-creds
stringData:
OPENSEARCH_DASHBOARD_URI: https://my-example-opensearch.my-cloud.com:443 (1)
OPENSEARCH_HOST: my-example-opensearch.my-cloud.com (2)
OPENSEARCH_PORT: 21699 (3)
OPENSEARCH_PASSWORD: my-secret (4)
OPENSEARCH_URI: https://superuser:my-secret@my-example-opensearch.my-cloud.com:21699 (5)
OPENSEARCH_USER: superuser (6)
1 | Dashboard URL |
2 | Hostname |
3 | Port |
4 | Password |
5 | API URL |
6 | User |
Not all fields apply to all providers |
Exoscale OpenSearch supports only connection via TLS.
The certificates are signed by Let’s Encrypt, so no ca.crt file required.
|