apiVersion: apps/v1
kind: Deployment
metadata:
  name: stateful-deployment
  labels:
    app: stateful
spec:
  replicas: 1
  selector:
    matchLabels:
      app: stateful
  template:
    metadata:
      labels:
        app: stateful
    spec:
      containers:
      - name: stateful
        image: docker.io/roger1349/stateful:v4
        ports:
        - containerPort: 8080
        volumeMounts:
        - name: stateful
          mountPath: /tmp
      volumes:
      - name: stateful
        persistentVolumeClaim:
          claimName: stateful-claim 
