apiVersion: apps/v1
kind: Deployment
metadata:
  name: redis-deployment
  labels:
    app: redis
spec: 
  replicas: 1
  selector:
    matchLabels:
      app: redis
  template:
    metadata:
      labels:
        app: redis
    spec:
      containers:
        - name: redis-master
          image: redis
          command: 
            - "redis-server"
          env:
            - name: MASTER
              value: "true"
          ports:
            - containerPort: 6379
