apiVersion: v1
kind: Service
metadata:
  name: lyrics
spec:
  type: NodePort
  ports:
    - name: http
      port: 5000
      nodePort: 30338
      targetPort: lyrics
  selector:
    app: lyrics
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: lyrics
  labels:
    app: lyrics
spec:
  replicas: 1
  selector:
    matchLabels:
      app: lyrics
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: lyrics
    spec:
      containers:
      - args:
          - gunicorn
          - --bind
          - 0.0.0.0:5000
          - lyrics:create_app()
        image: creylopez/lyrics:4.0
        name: lyrics
        ports:
        - containerPort: 5000
          name: lyrics
        resources: {}
        volumeMounts:
        - mountPath: /lyrics/instance
          name: lyrics-prod
      restartPolicy: Always
      volumes:
      - name: lyrics-prod
        persistentVolumeClaim:
          claimName: lyrics-prod
status: {}
