Updating Zen Discovery configuration

We can now combine these subdomains into a comma-separated list, and use it as the value for the discovery.zen.ping.unicast.hosts environment variable we are passing into the Elasticsearch containers. Update the manifests/elasticsearch/stateful-set.yaml file to read the following:

env:  - name: discovery.zen.ping.unicast.hosts    value: "elasticsearch-0.elasticsearch.default.svc.cluster.local,elasticsearch-1.elasticsearch.default.svc.cluster.local,elasticsearch-2.elasticsearch.default.svc.cluster.local"

The final stateful-set.yaml should read as follows:

apiVersion: apps/v1kind: StatefulSetmetadata:  name: elasticsearchspec:  replicas: 3  serviceName: elasticsearch  selector:    matchLabels:      app: elasticsearch template: ...

Get Building Enterprise JavaScript Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.