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,570 points
852 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,360 points
719 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,360 points
4,046 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,360 points
667 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
595 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
14,525 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,360 points

reshown Apr 12, 2019 by Kalgi 5,978 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,364 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