Skip to content

Instantly share code, notes, and snippets.

@joeywhelan
Created March 14, 2025 19:46
echo -e "\n*** Activate East as a Remote Cluster on West ***"
json=$(jq -nc \
--arg proxy_address "$EAST_ELASTIC_IP":9300 \
'{
persistent: {
cluster: {
remote: {
east_remote: {
mode: "proxy",
proxy_address: $proxy_address
}
}
}
}
}')
WEST_ELASTIC_IP=$(kubectl get service westcluster-es-http -o=jsonpath='{.status.loadBalancer.ingress[0].ip}')
curl -s -k -u "elastic:elastic" -X PUT "https://$WEST_ELASTIC_IP:9200/_cluster/settings" \
-H "Content-Type: application/json" \
-d "$json"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment