<p>I have installed a Redis 6.2 <a href="https://artifacthub.io/packages/helm/bitnami/redis/16.13.2" rel="nofollow noreferrer">helm chart</a> on my Kubernetes 1.21 cluster with a 1 master - 2 replica setup and <code>persistence</code> to <code>false</code>. <code>Master</code> is being deployed as <code>deployment</code>, not as <code>Statefulset</code>. Not using sentinel and not interested on failover or persistence, but yes on max availability.</p>
<p><strong>The problem is that my replica pods are restarted everytime the master pod is killed and the replicas try to sync with the new master pod.</strong></p>
<p>My replicas receive a <code>SIGTERM</code> which is handled as a <code>User requested shutdown</code> when they connect with the new master and try to <code>SYNC</code>. After the restart, the new replica pods connect with master and execute a <code>Full resync from master</code>.</p>
<p>Is there a way in which the <code>Full rsync</code> can be done without killing the replica pods?</p>
<p>Killed replica:</p>
<pre><code># Connection with master lost.
* Caching the disconnected master state.
* Reconnecting to MASTER master.svc.cluster.local:6379
* MASTER &lt;-&gt; REPLICA sync started
* Non blocking connect for SYNC fired the event.
 Received SIGTERM scheduling shutdown...
# User requested shutdown...
* Saving the final RDB snapshot before exiting.
* DB saved on disk
# Redis is now ready to exit, bye bye...
</code></pre>
<p>And then, new replica:</p>
<pre><code>Error reply to PING from master: '-Reading from master: Connection reset by peer'
Connecting to MASTER redis.svc.cluster.local:6379
MASTER &lt;-&gt; REPLICA sync started
Non blocking connect for SYNC fired the event.
Error reply to PING from master: '-Reading from master: Connection reset by peer'
Connecting to MASTER redis.svc.cluster.local:6379
MASTER &lt;-&gt; REPLICA sync started
Non blocking connect for SYNC fired the event.
Master replied to PING, replication can continue...
Trying a partial resynchronization (request 7e6958077894b94d780764e4ff1557da975c97ce:2451).
Full resync from master: fba2de4e35987b777085f944d0f1c5a8e2185894:0
Discarding previously cached master state.
MASTER &lt;-&gt; REPLICA sync: receiving 175 bytes from master to disk
MASTER &lt;-&gt; REPLICA sync: Flushing old data
MASTER &lt;-&gt; REPLICA sync: Loading DB in memory...
Loading RDB produced by version 6.2.7
RDB age 0 seconds
RDB memory usage when created 1.83 Mb
Done loading RDB, keys loaded: 0, keys expired: 0.
MASTER &lt;-&gt; REPLICA sync: Finished with success
</code></pre>

RicHincapie
<p>Setting two replicas for the master can help me avoid restarting the replica, as none of the master pods is available when we have single replica for master.</p>
<pre><code> helm upgrade -i my-release bitnami/redis --set master.kind=Deployment --set master.count=2
</code></pre>
<p>but you should enable the <code>persistent</code> for master</p>
<pre><code>--set master.persistence.enabled=true
</code></pre>
<p>This is what happening right now with the deployment</p>
<blockquote>
<p>We have a setup with node A acting as master, with persistence turned down, and nodes B and C replicating from node A.</p>
</blockquote>
<blockquote>
<p>Node A crashes, however it has some auto-restart system, that restarts the process. <strong>However since persistence is turned off, the node restarts with an empty data set.</strong></p>
</blockquote>
<blockquote>
<p>Nodes B and C will replicate from node A, which is empty, so they'll effectively destroy their copy of the data.</p>
</blockquote>
