Configure private network connections (PrivateLink) for Aliyun Elasticsearch clusters. Covers two scenarios: (1) ES-to-ECS via CLB+PrivateLink for Watcher, LDAP, AD auth, custom plugin dictionaries, and cross-cluster reindex from self-managed ES; (2) ES-to-ES via NLB+PrivateLink for cross-cluster reindex/migration between two Aliyun ES instances. Use when: configuring Aliyun ES private network connectivity, setting up PrivateLink for ES, enabling X-Pack Watcher/LDAP/AD behind new network architecture, cross-VPC ES communication, ES cluster migration via reindex. Trigger phrases: "configure private connection", "ES privatelink", "ES private network", "ES to ECS connectivity", "ES to ES reindex", "privatelink setup", "ES watcher webhook", "ES LDAP configuration", "cross-VPC elasticsearch", "aliyun ES migration", "ES reindex remote whitelist", "endpoint service for ES".
Aliyun ES instances created after October 2020 use a new network architecture that restricts certain features (Watcher, reindex, LDAP, AD auth). PrivateLink + Load Balancer is the only solution for private network connectivity under this architecture.
| Parameter | Required | Description |
|---|---|---|
| Scenario | Yes | es-to-ecs (Watcher/LDAP/AD/reindex from self-managed) or es-to-es (cross-cluster reindex/migration) |
| Region | Yes | Aliyun region (e.g., cn-hangzhou, cn-shanghai) — must be same for all resources |
| Availability Zone | Yes | Must match across ES, LB, and target |
| ES Instance ID | Yes | The ES instance initiating the connection |
| Target | Yes | ECS IP/service (scenario 1) or ES_2 instance (scenario 2) |
| Target Port |
| No |
| Default: 9200 (ES), 389 (LDAP), 636 (LDAPS), 8080 (webhook) |
| Protocol | No | http or https — must match target ES cluster config |
| Scenario | LB Type | Reference |
|---|---|---|
| ES → ECS (Watcher, LDAP, AD, plugins, reindex from self-managed) | CLB (private) | references/clb-es-to-ecs.md |
| ES → ES (cross-cluster reindex/migration) | NLB (private, IP type) | references/nlb-es-to-es.md |
Each reference guide covers the full step-by-step. The high-level flow is:
Create LB (CLB or NLB) → Add backend servers → Create Endpoint Service
→ Add Private Connection in ES Console → Allow Connection → Get Endpoint Domain
Depending on the use case:
reindex.remote.whitelist in ES YML confighosturlAfter completing the steps, verify connectivity:
bash scripts/test_privatelink_connectivity.sh \
--endpoint "ep-xxxx.privatelink.aliyuncs.com" \
--port 9200 \
--protocol http \
--es-host "https://ES1_ENDPOINT:9200" \
--es-user elastic \
--es-pass "<password>" \
--remote-index "source_index" \
--local-index "dest_index" \
--cleanup
The script runs 4 checks:
Success criteria: All 4 checks pass. For reindex, compare dest_index/_count with source.
--protocol httpsreindex.remote.whitelist includes <endpoint_domain>:9200 (restart required)http:// if ES_2 doesn't have TLS, https:// if it does0.0.0.0, not 127.0.0.1endpoint_domain:9200 to reindex.remote.whitelist in ES_1 YML config before reindexing; cluster restart is requiredhttp:// or https:// prefix matching your ES cluster's protocol in reindex host