---
apiVersion: apps/v1 
kind: Deployment
metadata:
  name: httpd-webapp
  labels:
    app: webapp
spec:
  selector:
    matchLabels:
      app: webapp
      tier: frontend
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: webapp
        tier: frontend
    spec:
      containers:
      - image: minikube:5000/httpd:latest
        name: httpd-container
        ports:
        - containerPort: 80
          name: httpd 
        volumeMounts:
        - name: httpd-volume
          mountPath: /usr/local/apache2/htdocs
      volumes:
      - name: httpd-volume
        persistentVolumeClaim:
          claimName: httpd-pvc
