Redis slave deployment - Kubernetes

0 votes
I have deployed a redis master deployment on my Kube cluster. Now I need a way to scale this. I need two replicas of this. In case there aren't two replicas, the deployment should start the replicas.

How do I write a deployment for that?
Oct 23, 2019 in Kubernetes by Hannah
• 18,520 points
1,099 views

1 answer to this question.

0 votes

You can something like this, Make the reqquiured changes:

application/appl/redis-slave-deployment.yaml 

apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
  name: redis-slave
  labels:
    app: redis
spec:
  selector:
    matchLabels:
      app: redis
      role: slave
      tier: backend
  replicas: 2
  template:
    metadata:
      labels:
        app: redis
        role: slave
        tier: backend
    spec:
      containers:
      - name: slave
        image: gcr.io/google_samples/gb-redisslave:v3
        resources:
          requests:
            cpu: 100m
            memory: 100Mi
        env:
        - name: GET_HOSTS_FROM
          value: dns
        ports:
        - containerPort: 637
answered Oct 23, 2019 by Eric

Related Questions In Kubernetes

0 votes
1 answer

Kubernetes Dashboard v1.8.3 deployment

You’ve created your ServiceAccount on a different ...READ MORE

answered Aug 27, 2018 in Kubernetes by Kalgi
• 52,350 points
977 views
0 votes
1 answer

Kubernetes- Jenkins slave node shows offline

TCP port for JNLP slave agent should ...READ MORE

answered Sep 5, 2018 in Kubernetes by Kalgi
• 52,350 points
4,654 views
0 votes
1 answer

map 2 ports in my deployment file - kubernetes ingress

You can add as many ports as ...READ MORE

answered Sep 24, 2018 in Kubernetes by Kalgi
• 52,350 points
1,025 views
0 votes
1 answer

Unable to open jenkins on the slave- Kubernetes

Execute these commands first and let me ...READ MORE

answered Dec 19, 2018 in Kubernetes by Charlie
805 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
15,476 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,035 views
0 votes
1 answer
0 votes
1 answer

Deploy PHP application with Redis - Kubernetes

Hi, @Hannah, Follow these steps: 1. Create a ...READ MORE

answered Oct 23, 2019 in Kubernetes by Eric
1,542 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP