apiVersion: apps/v1
kind: Deployment
metadata:
 name: redis-master
 labels:
  app: redis
spec:
 selector:
  matchLabels:
   app: redis
 replicas: 1
 template:
  metadata:
   labels:
    app: redis
    role: master
  spec:
   containers:
   - name: master
     image: redis
     ports:
     - containerPort: 6379