Redis image is not getting pulled from repository

Hi

We are using docker, Kubernetes , redis data base for application.

I have issue in redis image. it is not getting pulled up from image repository after restart in multiple times.
Pod is shifted to other nodes after restarting it. I have restarted pod multiple times. Redis pod is not coming up due to ImagePullBackOff in other nodes

Type Reason Age From Message


Normal BackOff 8m37s (x1103 over 4h23m) kubelet, ndc3vlnptms07 Back-off pulling image “x.x.x.x:5000/tms/redis:5.0.4-alpine”
Warning Failed 3m35s (x1125 over 4h23m) kubelet, ndc3vlnptms07 Error: ImagePullBackOff

please help to understand issue and root cause

This is usually due to one of two things:

  • an issue with the container repo
  • if the container repo is private, the K8s config for imagePullSecrets — this must be provided to use container images from private repos

If it’s a private container repo, see Pull an Image from a Private Registry | Kubernetes for more information. If it’s a public repo or you have the imagePullSecrets configured properly, then you’ll need to check the docs for the container registry and/or contact their support.

Please help to understand three questions
1> can we run master redis pod on one node and slave redis pod in other nodes (different nodes)
2> if master redis pod is down or not working then slave will serve application traffic or not
3> Is any way to have HA(high availability for master redis pod and slave redis pod)

can we run master redis pod on one node and slave redis pod in other nodes (different nodes)

Yes, you can run them on separate nodes, zones, or regions. In fact, in order to maximize availability, you want them on separate nodes. You just tell the replicas to run REPLICAOF [primary-pod-or-svc].

if master redis pod is down or not working then slave will serve application traffic or not

A failure of the primary will not affect the availability of the replicas. You can still send read-only commands to the replicas until failover is performed.

Is any way to have HA(high availability for master redis pod and slave redis pod)

Failover is not automatic in replication mode. Cluster mode (shard + replicas) can do this (but your cluster client needs to be able to respond to changes in cluster topology), but pure replication mode will not. You have to either handle failover manually or run redis-sentinel for it.