apiVersion: apps/v1
kind: Deployment
metadata:
  name: redis
  namespace: staging
spec:
  selector:
    matchLabels:
      app: redis
  replicas: 1
  template:
    metadata:
      labels:
        app: redis
    spec:
      containers:
      - image: redis:3.2-alpine
        name: redis
        ports:
        - containerPort: 6379
        volumeMounts:
        - mountPath: /data
          name: redisdata
      restartPolicy: Always
      volumes:
      - name: redisdata
        persistentVolumeClaim:
          claimName: redisdata
      nodeSelector:
        cloud.google.com/gke-preemptible: "true"