apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: nextcloud-cache
  name: nextcloud-cache
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nextcloud-cache
  template:
    metadata:
      labels:
        app: nextcloud-cache
    spec:
      containers:
        - name: redis
          image: redis:5-alpine
          imagePullPolicy: IfNotPresent
          ports:
            - name: redis
              containerPort: 6379
              protocol: TCP
          livenessProbe:
            initialDelaySeconds: 5
            exec:
              command:
                - redis-cli
                - ping
          readinessProbe:
            initialDelaySeconds: 5
            exec:
              command:
                - redis-cli
                - ping
