apiVersion: apps/v1
kind: Deployment
metadata:
  name: myredis-deployment
  labels:
    app: myredis
    component: web

spec:
  template:
    metadata:
      name: myredis-pod
      labels:
        app: myredis
        component: web
    spec:
      containers:
      - name: myredis-container
        image: redis:alpine
  replicas: 1 # For DB keep replicas value as 1
  selector:
    matchLabels:
      app: myredis
      component: web