apiVersion: apps/v1
kind: Deployment
metadata:
  name: face-recognition-deployment
  labels:
    app: face-recognition
spec:
  replicas: 2
  selector:
    matchLabels:
      app: face-recognition
  template:
    metadata:
      labels:
        app: face-recognition
    spec:
      containers:
      - name: face-recognition
        image: adrianmompo/face-recognition:latest
        imagePullPolicy: Always
        volumeMounts:
          - name: nfs-volume
            mountPath: /app/nfs
        ports:
        - containerPort: 5000
      imagePullSecrets:
      - name: regcred
      volumes:
        - name: nfs-volume
          nfs:
            server: 10.240.0.5
            path: /nfs