<p>Is there anyway we can migrate Redis Cluster data that are running inside 2 different Kubernetes cluster? How we can communicate between Redis stateful pods which are running on two different Kubernetes Clusters?</p>
<p>We have two Redis Clusters which are running on two different Kubernetes Clusters X &amp; Y. I want to transfer data from redis-X to redis-Y cluster. How we can establish connection between redis-X and redis-Y clusters so that we can migrate data?</p>
<p>Any help or hint is appreciated.</p>

<p>There are two possible approaches to establish connection between clusters:</p>
<ol>
<li>Built-in solutions</li>
<li>3rd party solution</li>
</ol>
<h3>Built-in solutions</h3>
<ul>
<li><a href="https://kubernetes.io/docs/concepts/services-networking/service/#nodeport" rel="nofollow noreferrer"><code>NodePort</code></a> - Exposes the service on each Node’s IP at a static port (the <code>NodePort</code>). A <code>ClusterIP</code> service, to which the <code>NodePort</code> service routes, is automatically created. You’ll be able to contact the <code>NodePort</code> service, from outside the cluster, by requesting <code>&lt;NodeIP&gt;</code>:<code>&lt;NodePort&gt;</code></li>
<li><a href="https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer" rel="nofollow noreferrer"><code>LoadBalancer</code></a> - Exposes the Service externally using a cloud provider’s load balancer. <code>NodePort</code> and <code>ClusterIP</code> services, to which the external load balancer routes, are automatically created.</li>
<li><a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer"><code>ingress</code></a> (both 1st and 3rd party implementations) - more flexible then previous two, but only works with HTTP/HTTPS.</li>
</ul>
<p>Read more: <a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">Kubernets services</a>, <a href="https://kubernetes.github.io/ingress-nginx/" rel="nofollow noreferrer">NGINX ingress</a></p>
<h3>3rd party solution</h3>
<p><a href="https://istio.io/latest/" rel="nofollow noreferrer">Istio</a> supports <a href="https://istio.io/latest/docs/ops/deployment/deployment-models/#multiple-clusters" rel="nofollow noreferrer">multi-cluster deployment</a> model. However, if you don't have service mesh deployed, doing so may be too much for single task use.</p>
<hr />
<p>Once you have connection established between clusters you can migrate Redis using <a href="https://redis.io/commands/migrate" rel="nofollow noreferrer"><code>MIGRATE</code></a> command, or <a href="https://github.com/vipshop/redis-migrate-tool" rel="nofollow noreferrer"><code>redis-migrate-tool</code></a> proposed in comments.</p>
