apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: image
    role: web
  name: image-web
  namespace: blog
spec:
  replicas: 1
  selector:
    matchLabels:
      app: image
      role: web
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: image
        role: web
    spec:
      containers:
      - image: nginx
        imagePullPolicy: Always
        name: server
        volumeMounts:
        - mountPath: /usr/share/nginx/html
          name: public
      volumes:
      - name: public
        persistentVolumeClaim:
          claimName: image-assets
