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, 2019 in Kubernetes by Hannah
• 18,570 points
794 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, 2019 by Eric

Related Questions In Kubernetes

0 votes
1 answer

What is Ingress ? Is it something that runs as a pod or on a pod?

An ingress is an object that holds ...READ MORE

answered Jul 19, 2019 in Kubernetes by Sirajul
• 59,230 points
1,705 views
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
• 7,050 points
2,409 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,618 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 6,111 views
0 votes
1 answer

Redis slave deployment - Kubernetes

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

answered Oct 23, 2019 in Kubernetes by Eric
872 views
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,380 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