---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: stickyreaderwriter
spec:
  replicas: 1
  selector:
    matchLabels:
      app: stickyreaderwriter
  template:
    metadata:
      labels:
        app: stickyreaderwriter
    spec:
      volumes:
        - name: sticky-pv-storage
          persistentVolumeClaim:
           claimName: sticky-pv-claim
      containers:
        - name: stickyreaderwriter
          image: reselbob/stickyreaderwriter:v1
          imagePullPolicy: Always
          ports:
            - containerPort: 8112
              name: "http-server"
          volumeMounts:
            - mountPath: "/mydata"
              name: sticky-pv-storage