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 in Kubernetes by Hannah
• 16,420 points
38 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 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
• 42,410 points
189 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
• 42,410 points
823 views
0 votes
1 answer
0 votes
1 answer

Unable to open jenkins on the slave- Kubernetes

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

answered Dec 18, 2018 in Kubernetes by Charlie
82 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

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

answered Jan 17 in Others by anonymous
3,033 views
+3 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 in Kubernetes by Eric
24 views