apiVersion: apps/v1
kind: Deployment
metadata:
  name: database-dp
  labels:
    app: database
    type: database
    env: production
spec:
  replicas: 1
  selector:
    matchLabels:
      app: database  
  template:
    metadata:
      name: database
      labels:
        app: database
        type: database
        env: production
    spec:
      containers:
        - image: redis:alpine
          name: database
          ports:
            - containerPort: 6379
              name: database
          volumeMounts:
            - mountPath: /data
              name: database-data
      volumes:
        - name: database-data
          emptyDir: {}

