kind: Deployment
apiVersion: apps/v1
metadata:
  name: nginx-deployment
spec:
  selector:
    matchLabels:
      app: nginx
  replicas: 3
  template:
    metadata:
      labels:
        app: nginx
    spec:
      volumes:
        - name: my-pvc-nfs
          nfs:
            server: nfs-server.default.svc.cluster.local
            path: "/"
            readOnly: false
      containers:
        - name: nginx
          image: nginx
          volumeMounts:
            - name: my-pvc-nfs
              mountPath: /usr/share/nginx/html
          livenessProbe:
            httpGet:
              path: /
              port: 80
            initialDelaySeconds: 5