apiVersion: v1
kind: Service
metadata:
  name: redis-master
  labels:
    app: staffjoy
    role: master
    tier: backend
spec:
  ports:
  - port: 6379
    targetPort: 6379
  selector:
    app: staffjoy
    role: master
    tier: backend

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: redis-master
  labels:
    app: staffjoy
    role: master
    tier: backend
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: staffjoy
        role: master
        tier: redis
    spec:
      containers:
      - name: master
        image: redis
        ports:
        - containerPort: 6379
          name: redis
