Using Altoros Elasticsearch for VMware Tanzu

This topic describes how to use Altoros Elasticsearch for VMware Tanzu after it has been installed.

Use Altoros Elasticsearch for VMware Tanzu with applications

Follow the procedures below to create and bind a service instance to your applications.

View the Service

Once the tile has been installed, a-elasticsearch and its service plans appear in your Marketplace. Run the cf marketplace command to see the service listing.

$ cf marketplace
Getting services from marketplace in org admin / space dev as admin...

service           plans     description
a-elasticsearch   default   Shared Elasticsearch Cluster

Create a Service Instance

Use the cf create-service command to provision a keyspace.

$ cf create-service a-elasticsearch default elasticsearch

Check the service creation status using the cf services command. It displays the list of all your service instances. To check the status of any specific service instance, run cf service a-elasticsearch.

Bind the Service Instance to an App

After you have created your keyspace, run the cf bind-service command to bind the service to your app.

$ cf bind-service sample-app elasticsearch

Restage or Restart Your App

To enable access to the service instance, run cf restage or cf restart to restage or restart your app.

Obtain the Service Instance Access Credentials

After you have bound your service instance to your app, you can find the credentials of your Elasticsearch user in the environment variables of the app.

Run cf env APP-NAME to display environment variables. The credentials are listed under the VCAP_SERVICES key.

$ cf env sample-app
Getting env variables for app sample-app in org system / space test as admin...

   "a-elasticsearch": [
     "binding_name": null,
     "credentials": {
      "host": "http://master.elasticsearch.internal:9200",
      "host_ip": [
      "host_ips": [
      "index": "zkrdxiaqzxem",
      "index-prefix": "zkrdxiaqzxem",
      "password": "vkmmbsowhyiech",
      "port": 9200,
      "scheme": "http",
      "username": "dmyelobc"
     "instance_name": "index",
     "label": "a-elasticsearch",
     "name": "index1",
     "plan": "default",
     "provider": null,
     "syslog_drain_url": null,
     "tags": [
     "volume_mounts": []

You can use these parameters to connect to Elasticsearch.

Here is role that will be created for username “dmyelobc”

      - indices:admin/aliases/get
      - ALL

Delete an Altoros Elasticsearch for VMware Tanzu Service Instance

WARNING! Before deleting a service instance, you must back up data stored in your keyspace. This operation cannot be undone, and all the data is lost when the service is deleted.

Follow the instructions below to unbind your service instance from all apps and then delete it.

List All Available Services

Run the cf service command to list available services.

$ cf services
Getting services in org system / space test as admin...

name            service           plan      bound apps   last operation
elasticsearch   a-elasticsearch   default   sample-app   create succeeded

This example shows that elasticsearch is bound to the sample-app app.

Unbind a Service Instance

Run cf unbind to disconnect the service from your app:

$ cf unbind-service sample-app elasticsearch

Delete a Service Instance

Run cf delete-service to remove the service.

  $ cf delete-service elasticsearch

Run the cf services command to check the deletion status.