Deployment controller that runs a single replica Redis master Pod - kubernetes

0 votes
I need a deployment controller that runs a single replica Redic master pod on Kubernetes. Can somebody please help em with writing the deployment.YAML file? It's a little urgent! Thanks
Oct 23 in Kubernetes by Hannah
• 16,730 points
17 views

1 answer to this question.

0 votes

Hi @Hannah, you can use something like this:

application/appl/redis-master-deployment.yaml 

apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
  name: redis-master
  labels:
    app: redis
spec:
  selector:
    matchLabels:
      app: redis
      role: master
      tier: backend
  replicas: 1
  template:
    metadata:
      labels:
        app: redis
        role: master
        tier: backend
    spec:
      containers:
      - name: master
        image: k8s.gcr.io/redis:e2e  # or just image: redis
        resources:
          requests:
            cpu: 100m
            memory: 100Mi
        ports:
        - containerPort: 637
answered Oct 23 by Eric

Related Questions In Kubernetes

0 votes
1 answer
0 votes
1 answer
0 votes
2 answers

Access Kubernetes api from within a pod container

wget version: KUBE_TOKEN=$(</var/run/secrets/kubernetes.io/serviceaccount/token) wget -vO- ...READ MORE

answered Aug 29, 2018 in Kubernetes by Nilesh
• 6,880 points
353 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,112 views
+3 votes
1 answer
0 votes
1 answer

Redis slave deployment - Kubernetes

You can something like this, Make the ...READ MORE

answered Oct 23 in Kubernetes by Eric
46 views
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
33 views