Cross Cluster Replication across 2 k8s cluster is not working

Hi,

We are trying to establish a cross-cluster replication setup between two Kubernetes clusters. We are unable to establish the connection between the leader and the follower using nodePort using the below APIs documented from the OpenSearch documentation. In our case, we have not enabled security plugin.

We have tried creating an API call to _cluster/settings as:

curl -XPUT "http://${FOLLOWER}/_cluster/settings?pretty" \ -H 'Content-Type: application/json' -d "                                                                                                                                             
{   
\"persistent\": {                                                                                                                      
   \"cluster\": {
     \"remote\": {
       \"leader-cluster\": {
          \"seeds\": [ \"${LEADER_TRANSPORT}\" ]
       }
     }
   }
 }
}
"

and we have also tried using _autofollow API call for the replication of required indices for the follower to follow.

curl -XPOST “http://${FOLLOWER}/_plugins/_replication/_autofollow?pretty” -H ‘Content-type: application/json’ -d’{ “leader_alias” : “leader-cluster”, “name”: “test-rule”, “pattern”: “test*” }’

output:

{
 "error" : {
 "root_cause" : [
   {
     "type" : "illegal_state_exception",
     "reason" : "Unable to open any connections to remote cluster [leader- cluster]"
   }
 ],
 "type" : "illegal_state_exception",
 "reason" : "Unable to open any connections to remote cluster [leader-cluster]"
},
"status" : 500
}

Query:
Does Cross-Cluster Replication plugin work across 2 different Kubernetes clusters? Is there any other configuration required for the connection to be established?

Note:
Cross-Cluster Replication works on the same Kubernetes cluster where the leader and the follower OpenSearch clusters are across different namespace.

This is being tracked in Cross Cluster Replication across 2 k8s cluster is not working · Issue #633 · opensearch-project/cross-cluster-replication · GitHub